From 8ac4ecece4d545ab3cd01c6ab156d375abe46247 Mon Sep 17 00:00:00 2001 From: John Hodge Date: Sat, 10 Dec 2016 14:44:52 +0800 Subject: Trans Mangle - Handle - in ABIs --- src/trans/mangling.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') 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(); -- cgit v1.2.3