OSDN Git Service

Add missing argument for atomic instructions in c++ backend. PR11268, part 2.
authorEli Friedman <eli.friedman@gmail.com>
Fri, 4 Nov 2011 17:29:35 +0000 (17:29 +0000)
committerEli Friedman <eli.friedman@gmail.com>
Fri, 4 Nov 2011 17:29:35 +0000 (17:29 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143712 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/CppBackend/CPPBackend.cpp

index 17ca23a..394ea2b 100644 (file)
@@ -1492,7 +1492,7 @@ void CppWriter::printInstruction(const Instruction *I,
     StringRef CrossThread = ConvertAtomicSynchScope(fi->getSynchScope());
     Out << "FenceInst* " << iName
         << " = new FenceInst(mod->getContext(), "
-        << Ordering << ", " << CrossThread
+        << Ordering << ", " << CrossThread << ", " << bbname
         << ");";
     break;
   }
@@ -1503,7 +1503,7 @@ void CppWriter::printInstruction(const Instruction *I,
     Out << "AtomicCmpXchgInst* " << iName
         << " = new AtomicCmpXchgInst("
         << opNames[0] << ", " << opNames[1] << ", " << opNames[2] << ", "
-        << Ordering << ", " << CrossThread
+        << Ordering << ", " << CrossThread << ", " << bbname
         << ");";
     nl(Out) << iName << "->setName(\"";
     printEscapedString(cxi->getName());
@@ -1533,7 +1533,7 @@ void CppWriter::printInstruction(const Instruction *I,
         << " = new AtomicRMWInst("
         << Operation << ", "
         << opNames[0] << ", " << opNames[1] << ", "
-        << Ordering << ", " << CrossThread
+        << Ordering << ", " << CrossThread << ", " << bbname
         << ");";
     nl(Out) << iName << "->setName(\"";
     printEscapedString(rmwi->getName());