diff options
author | John Hodge <tpg@mutabah.net> | 2016-12-16 23:40:25 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2016-12-16 23:40:25 +0800 |
commit | 4f585058eb06e28802279249b728d0e16a618d3e (patch) | |
tree | 0fc609c95ecad211a2c31da042a26c117bb0bacd /src | |
parent | 5aea1a2a905cf4aff72a934c6550132c1d29ea68 (diff) | |
download | mrust-4f585058eb06e28802279249b728d0e16a618d3e.tar.gz |
Trans C - Clean up a little
Diffstat (limited to 'src')
-rw-r--r-- | src/trans/codegen_c.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/trans/codegen_c.cpp b/src/trans/codegen_c.cpp index cee8228b..ec85ec0f 100644 --- a/src/trans/codegen_c.cpp +++ b/src/trans/codegen_c.cpp @@ -50,7 +50,10 @@ namespace { << "typedef struct { } tTYPEID;\n" << "typedef struct { void* PTR; size_t META; } SLICE_PTR;\n" << "typedef struct { void* PTR; void* META; } TRAITOBJ_PTR;\n" - << "\n"; + << "\n" + << "extern void _Unwind_Resume(void);\n" + << "\n" + ; } ~CodeGenerator_C() {} @@ -60,7 +63,7 @@ namespace { m_of << "int main(int argc, const char* argv[]) {\n" << "\t" << Trans_Mangle( ::HIR::GenericPath(m_resolve.m_crate.get_lang_item_path(Span(), "start")) ) << "(" - << Trans_Mangle( ::HIR::GenericPath(::HIR::SimplePath("", {"main"})) ) << ", argc, argv" + << "(uint8_t*)" << Trans_Mangle( ::HIR::GenericPath(::HIR::SimplePath("", {"main"})) ) << ", argc, (uint8_t**)argv" << ");\n" << "}\n"; } |