Do not pass a null pointer if this instruction is not prepended or
authorAlkis Evlogimenos <alkis@evlogimenos.com>
Wed, 26 May 2004 22:50:28 +0000 (22:50 +0000)
committerAlkis Evlogimenos <alkis@evlogimenos.com>
Wed, 26 May 2004 22:50:28 +0000 (22:50 +0000)
appended anywhere.

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

lib/Transforms/Utils/CodeExtractor.cpp

index 4d1093b739dac43d71b805e637e0ef65d2bb61c7..cab281a7fcbe46a0bc6f939d5aeebad17573ad9a 100644 (file)
@@ -394,7 +394,7 @@ emitCallAndSwitchStatement(Function *newFunction, BasicBlock *codeReplacer,
       Indices.push_back(ConstantUInt::get(Type::UIntTy, i));
       GetElementPtrInst *GEP =
         new GetElementPtrInst(Struct, Indices,
-                              "gep_" + StructValues[i]->getName(), 0);
+                              "gep_" + StructValues[i]->getName());
       codeReplacer->getInstList().push_back(GEP);
       StoreInst *SI = new StoreInst(StructValues[i], GEP);
       codeReplacer->getInstList().push_back(SI);
@@ -420,7 +420,7 @@ emitCallAndSwitchStatement(Function *newFunction, BasicBlock *codeReplacer,
       Indices.push_back(ConstantUInt::get(Type::UIntTy, FirstOut + i));
       GetElementPtrInst *GEP 
         = new GetElementPtrInst(Struct, Indices,
-                                "gep_reload_" + outputs[i]->getName(), 0);
+                                "gep_reload_" + outputs[i]->getName());
       codeReplacer->getInstList().push_back(GEP);
       Output = GEP;
     } else {