Do not pass a null pointer if this instruction is not prepended or
appended anywhere.
llvm-svn: 13798
diff --git a/llvm/lib/Transforms/Utils/CodeExtractor.cpp b/llvm/lib/Transforms/Utils/CodeExtractor.cpp
index 4d1093b..cab281a 100644
--- a/llvm/lib/Transforms/Utils/CodeExtractor.cpp
+++ b/llvm/lib/Transforms/Utils/CodeExtractor.cpp
@@ -394,7 +394,7 @@
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 @@
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 {