[llvm] r175120 - Don't asume that a static function in an extern "C" block will not be mangled.

Rafael Espindola rafael.espindola at gmail.com
Wed Feb 13 17:58:09 PST 2013


Author: rafael
Date: Wed Feb 13 19:58:08 2013
New Revision: 175120

URL: http://llvm.org/viewvc/llvm-project?rev=175120&view=rev
Log:
Don't asume that a static function in an extern "C" block will not be mangled.
Since functions with internal linkage don't have language linkage, it is valid
to overload them:

extern "C" {
       static int foo();
       static int foo(int);
}

So we mangle them.

Modified:
    llvm/trunk/lib/Target/PowerPC/PPCJITInfo.cpp

Modified: llvm/trunk/lib/Target/PowerPC/PPCJITInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCJITInfo.cpp?rev=175120&r1=175119&r2=175120&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/PPCJITInfo.cpp (original)
+++ llvm/trunk/lib/Target/PowerPC/PPCJITInfo.cpp Wed Feb 13 19:58:08 2013
@@ -292,7 +292,7 @@ void PPC64CompilationCallback() {
 #endif
 
 extern "C" {
-static void* LLVM_ATTRIBUTE_USED PPCCompilationCallbackC(unsigned *StubCallAddrPlus4,
+void* LLVM_ATTRIBUTE_USED PPCCompilationCallbackC(unsigned *StubCallAddrPlus4,
                                                          unsigned *OrigCallAddrPlus4,
                                                          bool is64Bit) {
   // Adjust the pointer to the address of the call instruction in the stub





More information about the llvm-commits mailing list