diff options
author | Chris Lattner <sabre@nondot.org> | 2003-06-05 04:48:18 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-06-05 04:48:18 +0000 |
commit | 3cc301834e1c4678f941850ff1a37400ac97679d (patch) | |
tree | 98f61098b0ca235d8e5b467dff95fc91deda760a /llvm/lib/Transforms/Instrumentation/TraceValues.cpp | |
parent | cbbe7ac6996ec2918e41f683a5b10cc8293f0caf (diff) | |
download | bcm5719-llvm-3cc301834e1c4678f941850ff1a37400ac97679d.tar.gz bcm5719-llvm-3cc301834e1c4678f941850ff1a37400ac97679d.zip |
Use a constant expr GEP instead of an actual instruction
llvm-svn: 6620
Diffstat (limited to 'llvm/lib/Transforms/Instrumentation/TraceValues.cpp')
-rw-r--r-- | llvm/lib/Transforms/Instrumentation/TraceValues.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/TraceValues.cpp b/llvm/lib/Transforms/Instrumentation/TraceValues.cpp index 499bc4cf9d0..618466a4030 100644 --- a/llvm/lib/Transforms/Instrumentation/TraceValues.cpp +++ b/llvm/lib/Transforms/Instrumentation/TraceValues.cpp @@ -231,10 +231,8 @@ static void InsertPrintInst(Value *V, BasicBlock *BB, Instruction *InsertBefore, GlobalVariable *fmtVal = getStringRef(Mod, Message+getPrintfCodeFor(V)+"\n"); // Turn the format string into an sbyte * - Instruction *GEP = - new GetElementPtrInst(fmtVal, - vector<Value*>(2,ConstantSInt::get(Type::LongTy, 0)), - "trstrp", InsertBefore); + Constant *GEP =ConstantExpr::getGetElementPtr(ConstantPointerRef::get(fmtVal), + vector<Constant*>(2,Constant::getNullValue(Type::LongTy))); // Insert a call to the hash function if this is a pointer value if (V && isa<PointerType>(V->getType()) && !DisablePtrHashing) { |