Eliminate some calls to Value::getNameStr.
authorBenjamin Kramer <benny.kra@googlemail.com>
Sat, 16 Oct 2010 11:28:23 +0000 (11:28 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Sat, 16 Oct 2010 11:28:23 +0000 (11:28 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116670 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/ProfileVerifierPass.cpp
lib/AsmParser/LLParser.cpp
lib/Transforms/Scalar/ScalarReplAggregates.cpp

index f0fa05a29f70163d8c36454c477630438da516d8..784f63f4fe85a16c95cdb752330b256900d04f44 100644 (file)
@@ -287,7 +287,7 @@ namespace llvm {
            i != ie; ++i) {
         if (const CallInst *CI = dyn_cast<CallInst>(&*i)) {
           FType *F = CI->getCalledFunction();
-          if (F && (F->getNameStr() == "_setjmp")) {
+          if (F && (F->getName() == "_setjmp")) {
             isSetJmpTarget = true; break;
           }
         }
index 9efa772925344f76c1c3954e52654c8cf967e92b..403fdd4527d53ce0d7af2ffc979a21abb90260b9 100644 (file)
@@ -675,7 +675,7 @@ bool LLParser::ParseAlias(const std::string &Name, LocTy NameLoc,
 
   // Insert into the module, we know its name won't collide now.
   M->getAliasList().push_back(GA);
-  assert(GA->getNameStr() == Name && "Should not be a name conflict!");
+  assert(GA->getName() == Name && "Should not be a name conflict!");
 
   return false;
 }
@@ -1925,7 +1925,7 @@ bool LLParser::PerFunctionState::SetInstName(int NameID,
   // Set the name on the instruction.
   Inst->setName(NameStr);
 
-  if (Inst->getNameStr() != NameStr)
+  if (Inst->getName() != NameStr)
     return P.Error(NameLoc, "multiple definition of local value named '" +
                    NameStr + "'");
   return false;
@@ -2858,7 +2858,7 @@ bool LLParser::ParseFunctionHeader(Function *&Fn, bool isDefine) {
     // Set the name, if it conflicted, it will be auto-renamed.
     ArgIt->setName(ArgList[i].Name);
 
-    if (ArgIt->getNameStr() != ArgList[i].Name)
+    if (ArgIt->getName() != ArgList[i].Name)
       return Error(ArgList[i].Loc, "redefinition of argument '%" +
                    ArgList[i].Name + "'");
   }
index 27e49160a839c4a76f33be8c8bf0b1dfcb1c3952..51b721a5ca2e43cf3f15ad86d378bc2d9b405fec 100644 (file)
@@ -1446,7 +1446,7 @@ void SROA::RewriteMemIntrinUserOfAlloca(MemIntrinsic *MI, Instruction *Inst,
         Type *NewOtherPTy = PointerType::get(PTy->getElementType(),
                                              OtherPTy->getAddressSpace());
         OtherElt = new BitCastInst(OtherElt, NewOtherPTy,
-                                   OtherElt->getNameStr(), MI);
+                                   OtherElt->getName(), MI);
       }
     }