summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2016-12-10 14:44:52 +0800
committerJohn Hodge <tpg@mutabah.net>2016-12-10 14:44:52 +0800
commit8ac4ecece4d545ab3cd01c6ab156d375abe46247 (patch)
treec67551f8bc6f122907925c18b163cd7985e657c5 /src
parent22bd7357129f1af9228df66be76b9edfedb5adf2 (diff)
downloadmrust-8ac4ecece4d545ab3cd01c6ab156d375abe46247.tar.gz
Trans Mangle - Handle - in ABIs
Diffstat (limited to 'src')
-rw-r--r--src/trans/mangling.cpp4
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();