diff options
| author | Chris Lattner <sabre@nondot.org> | 2004-04-05 01:30:19 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2004-04-05 01:30:19 +0000 |
| commit | 69193f93b689d3cc03ec9e685d662003d06134ea (patch) | |
| tree | ed36e2aa107383c32cc79bfb71deb1547afed277 /llvm/lib/Transforms/Instrumentation | |
| parent | fd9fbe187d9d4143f07f575f0722f185ab0ce945 (diff) | |
| download | bcm5719-llvm-69193f93b689d3cc03ec9e685d662003d06134ea.tar.gz bcm5719-llvm-69193f93b689d3cc03ec9e685d662003d06134ea.zip | |
Support getelementptr instructions which use uint's to index into structure
types and can have arbitrary 32- and 64-bit integer types indexing into
sequential types.
llvm-svn: 12653
Diffstat (limited to 'llvm/lib/Transforms/Instrumentation')
| -rw-r--r-- | llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp b/llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp index 5baefe9b365..4cdcb9e5119 100644 --- a/llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp +++ b/llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp @@ -40,7 +40,7 @@ void llvm::InsertProfilingInitCall(Function *MainFn, const char *FnName, while (isa<AllocaInst>(InsertPos)) ++InsertPos; ConstantPointerRef *ArrayCPR = ConstantPointerRef::get(Array); - std::vector<Constant*> GEPIndices(2, Constant::getNullValue(Type::LongTy)); + std::vector<Constant*> GEPIndices(2, Constant::getNullValue(Type::IntTy)); Args[2] = ConstantExpr::getGetElementPtr(ArrayCPR, GEPIndices); unsigned NumElements = @@ -89,8 +89,8 @@ void llvm::IncrementCounterInBlock(BasicBlock *BB, unsigned CounterNum, // Create the getelementptr constant expression std::vector<Constant*> Indices(2); - Indices[0] = Constant::getNullValue(Type::LongTy); - Indices[1] = ConstantSInt::get(Type::LongTy, CounterNum); + Indices[0] = Constant::getNullValue(Type::IntTy); + Indices[1] = ConstantSInt::get(Type::IntTy, CounterNum); Constant *ElementPtr = ConstantExpr::getGetElementPtr(CounterArray, Indices); // Load, increment and store the value back. |

