diff options
author | John Hodge <tpg@mutabah.net> | 2016-12-10 14:44:52 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2016-12-10 14:44:52 +0800 |
commit | 8ac4ecece4d545ab3cd01c6ab156d375abe46247 (patch) | |
tree | c67551f8bc6f122907925c18b163cd7985e657c5 | |
parent | 22bd7357129f1af9228df66be76b9edfedb5adf2 (diff) | |
download | mrust-8ac4ecece4d545ab3cd01c6ab156d375abe46247.tar.gz |
Trans Mangle - Handle - in ABIs
-rw-r--r-- | src/trans/mangling.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/trans/mangling.cpp b/src/trans/mangling.cpp index 9c8c9e56..10b73f88 100644 --- a/src/trans/mangling.cpp +++ b/src/trans/mangling.cpp @@ -27,6 +27,8 @@ namespace { for(auto v : s) if( v == '#' ) output += "$H"; + else if( v == '-' ) + output += "_"; else output += v; return output; @@ -169,7 +171,7 @@ namespace { (Function, return FMT_CB(ss, if(te.m_abi != "Rust") - ss << "extern_" << te.m_abi << "_"; + ss << "extern_" << escape_str(te.m_abi) << "_"; if(te.is_unsafe) ss << "unsafe_"; ss << "fn_" << te.m_arg_types.size(); |