Handle quoted names when constructing $stub's,
[oota-llvm.git] / lib / Target / X86 / X86ATTAsmPrinter.cpp
index 4659deb1467d041bae3e61943f1ceb1596b7bb93..5cae112f578c16b725e8d14a73a75ebf23294b8b 100644 (file)
@@ -314,10 +314,10 @@ void X86ATTAsmPrinter::printOperand(const MachineInstr *MI, unsigned OpNo,
         // Dynamically-resolved functions need a stub for the function.
         if (isCallOp && isa<Function>(GV)) {
           FnStubs.insert(Name);
-          O << TAI->getPrivateGlobalPrefix() << Name << "$stub";
+          printSuffixedName(Name, "$stub");
         } else {
           GVStubs.insert(Name);
-          O << TAI->getPrivateGlobalPrefix() << Name << "$non_lazy_ptr";
+          printSuffixedName(Name, "$non_lazy_ptr");
         }
       } else {
         if (GV->hasDLLImportLinkage())
@@ -398,7 +398,7 @@ void X86ATTAsmPrinter::printOperand(const MachineInstr *MI, unsigned OpNo,
     Name += MO.getSymbolName();
     if (isCallOp && printStub(TM, Subtarget)) {
       FnStubs.insert(Name);
-      O << TAI->getPrivateGlobalPrefix() << Name << "$stub";
+      printSuffixedName(Name, "$stub");
       return;
     }
     if (!isCallOp)