diff options
author | Chris Lattner <sabre@nondot.org> | 2007-01-07 07:22:20 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-01-07 07:22:20 +0000 |
commit | febe5f1b3c43c217e4c32155cda9bcc9e1e50e11 (patch) | |
tree | 662cfc2882aac9d31e178edb5dd7eac9d4bb86a4 /lib/Transforms/Instrumentation/TraceBasicBlocks.cpp | |
parent | 35057c2625efb902048c215cf52f960f60944318 (diff) |
relax some types
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32982 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Instrumentation/TraceBasicBlocks.cpp')
-rw-r--r-- | lib/Transforms/Instrumentation/TraceBasicBlocks.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/Transforms/Instrumentation/TraceBasicBlocks.cpp b/lib/Transforms/Instrumentation/TraceBasicBlocks.cpp index 379005359d..68e0d282cc 100644 --- a/lib/Transforms/Instrumentation/TraceBasicBlocks.cpp +++ b/lib/Transforms/Instrumentation/TraceBasicBlocks.cpp @@ -45,17 +45,16 @@ static void InsertInstrumentationCall (BasicBlock *BB, DOUT << "InsertInstrumentationCall (\"" << BB->getName () << "\", \"" << FnName << "\", " << BBNumber << ")\n"; Module &M = *BB->getParent ()->getParent (); - Function *InstrFn = M.getOrInsertFunction (FnName, Type::VoidTy, + Constant *InstrFn = M.getOrInsertFunction (FnName, Type::VoidTy, Type::Int32Ty, (Type *)0); - std::vector<Value*> Args (1); - Args[0] = ConstantInt::get (Type::Int32Ty, BBNumber); - - // Insert the call after any alloca or PHI instructions... + + // Insert the call after any alloca or PHI instructions. BasicBlock::iterator InsertPos = BB->begin(); while (isa<AllocaInst>(InsertPos) || isa<PHINode>(InsertPos)) ++InsertPos; - new CallInst (InstrFn, Args, "", InsertPos); + new CallInst(InstrFn, ConstantInt::get (Type::Int32Ty, BBNumber), + "", InsertPos); } bool TraceBasicBlocks::runOnModule(Module &M) { |