Don't asume that a static function in an extern "C" block will not be mangled.
authorRafael Espindola <rafael.espindola@gmail.com>
Thu, 14 Feb 2013 01:58:08 +0000 (01:58 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Thu, 14 Feb 2013 01:58:08 +0000 (01:58 +0000)
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175120 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/PowerPC/PPCJITInfo.cpp

index 851de1778a9b7c5f3f1263b10ab7308771c17e82..df40cf187245967d57c6be85d27950d79e19cf2a 100644 (file)
@@ -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