[llvm-commits] [dragonegg] r148980 - /dragonegg/trunk/src/Backend.cpp

Duncan Sands baldrick at free.fr
Wed Jan 25 13:16:45 PST 2012


Author: baldrick
Date: Wed Jan 25 15:16:45 2012
New Revision: 148980

URL: http://llvm.org/viewvc/llvm-project?rev=148980&view=rev
Log:
On mingw, gcc decorates function names with @8 etc, then LLVM
codegen does it again: @8 at 8.  Tell gcc not to decorate and just
let LLVM do it.

Modified:
    dragonegg/trunk/src/Backend.cpp

Modified: dragonegg/trunk/src/Backend.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/src/Backend.cpp?rev=148980&r1=148979&r2=148980&view=diff
==============================================================================
--- dragonegg/trunk/src/Backend.cpp (original)
+++ dragonegg/trunk/src/Backend.cpp Wed Jan 25 15:16:45 2012
@@ -85,6 +85,9 @@
 #error Unsupported GCC major version
 #endif
 
+// TODO: In GCC, add targhooks.h to the list of plugin headers and remove this.
+extern "C" tree default_mangle_decl_assembler_name (tree, tree);
+
 // Non-zero if libcalls should not be simplified.
 int flag_no_simplify_libcalls;
 
@@ -1406,6 +1409,10 @@
   // Ensure that thunks are turned into functions rather than output directly
   // as assembler.
   targetm.asm_out.can_output_mi_thunk = no_target_thunks;
+
+  // Ensure that GCC doesn't decorate stdcall and fastcall function names:
+  // LLVM codegen takes care of this, and we don't want them decorated twice.
+  targetm.mangle_decl_assembler_name = default_mangle_decl_assembler_name;
 }
 
 





More information about the llvm-commits mailing list