summaryrefslogtreecommitdiff
path: root/lib/Transforms/Instrumentation
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-04-05 01:30:19 +0000
committerChris Lattner <sabre@nondot.org>2004-04-05 01:30:19 +0000
commit28977af72a11fcad5d1b54d7a96b3df02828f6fc (patch)
tree671a8fa4df839cb653ebd22dda8fa39639b3afa7 /lib/Transforms/Instrumentation
parent830b6f98686f40f86811dceb5497433ebac385e1 (diff)
downloadllvm-28977af72a11fcad5d1b54d7a96b3df02828f6fc.tar.gz
llvm-28977af72a11fcad5d1b54d7a96b3df02828f6fc.tar.bz2
llvm-28977af72a11fcad5d1b54d7a96b3df02828f6fc.tar.xz
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12653 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Instrumentation')
-rw-r--r--lib/Transforms/Instrumentation/ProfilingUtils.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Transforms/Instrumentation/ProfilingUtils.cpp b/lib/Transforms/Instrumentation/ProfilingUtils.cpp
index 5baefe9b36..4cdcb9e511 100644
--- a/lib/Transforms/Instrumentation/ProfilingUtils.cpp
+++ b/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.