Make PPCCompilationCallbackC function to be static, so there will be no need to issue...
authorAnton Korobeynikov <asl@math.spbu.ru>
Tue, 3 Apr 2012 06:59:28 +0000 (06:59 +0000)
committerAnton Korobeynikov <asl@math.spbu.ru>
Tue, 3 Apr 2012 06:59:28 +0000 (06:59 +0000)
PLT when LLVM is built as shared library. This mimics the X86 backend towards the approach.

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

lib/Target/PowerPC/PPCJITInfo.cpp

index 4590f0045641a50e67811f8b856f37fbdc05521f..a6528c0d7030f51ec3786477199be44482ba668b 100644 (file)
@@ -291,9 +291,10 @@ void PPC64CompilationCallback() {
 }
 #endif
 
-extern "C" void *PPCCompilationCallbackC(unsigned *StubCallAddrPlus4,
-                                         unsigned *OrigCallAddrPlus4,
-                                         bool is64Bit) {
+extern "C" {
+static void* LLVM_ATTRIBUTE_USED PPCCompilationCallbackC(unsigned *StubCallAddrPlus4,
+                                                         unsigned *OrigCallAddrPlus4,
+                                                         bool is64Bit) {
   // Adjust the pointer to the address of the call instruction in the stub
   // emitted by emitFunctionStub, rather than the instruction after it.
   unsigned *StubCallAddr = StubCallAddrPlus4 - 1;
@@ -337,6 +338,7 @@ extern "C" void *PPCCompilationCallbackC(unsigned *StubCallAddrPlus4,
   // stack after we restore all regs.
   return Target;
 }
+}