Make sure to pass OpFlags into MachineInstrBuilder::addExternalSymbol; the
authorEli Friedman <eli.friedman@gmail.com>
Sat, 11 Jun 2011 01:55:07 +0000 (01:55 +0000)
committerEli Friedman <eli.friedman@gmail.com>
Sat, 11 Jun 2011 01:55:07 +0000 (01:55 +0000)
memcpy/memset symbol doesn't get marked up correctly in PIC modes otherwise.
Should fix llvm-x86_64-linux-checks buildbot.  Followup to r132864.

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

lib/Target/X86/X86FastISel.cpp

index eeea18e1d8c1dfc0a09fc97232c00ff8aa2c907d..f1b9972530c68978118065778d87d208777ec464 100644 (file)
@@ -1784,7 +1784,7 @@ bool X86FastISel::DoSelectCall(const Instruction *I, const char *MemIntName) {
 
     MIB = BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DL, TII.get(CallOpc));
     if (MemIntName)
-      MIB.addExternalSymbol(MemIntName);
+      MIB.addExternalSymbol(MemIntName, OpFlags);
     else
       MIB.addGlobalAddress(GV, 0, OpFlags);
   }