diff options
author | Duncan Sands <baldrick@free.fr> | 2009-10-06 15:40:36 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2009-10-06 15:40:36 +0000 |
commit | f2519d6193d736ee7f2b9cc24e0143cfa933f79e (patch) | |
tree | 13cacd7f4cf35222c87f5021354fd8944756b1e0 /lib/Analysis | |
parent | 33b6450f08ca9ef6306adbd8cdb24145bf9a2202 (diff) | |
download | external_llvm-f2519d6193d736ee7f2b9cc24e0143cfa933f79e.zip external_llvm-f2519d6193d736ee7f2b9cc24e0143cfa933f79e.tar.gz external_llvm-f2519d6193d736ee7f2b9cc24e0143cfa933f79e.tar.bz2 |
Introduce and use convenience methods for getting pointer types
where the element is of a basic builtin type. For example, to get
an i8* use getInt8PtrTy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83379 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis')
-rw-r--r-- | lib/Analysis/PointerTracking.cpp | 2 | ||||
-rw-r--r-- | lib/Analysis/ScalarEvolutionExpander.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/Analysis/PointerTracking.cpp b/lib/Analysis/PointerTracking.cpp index 2281836..43f4af3 100644 --- a/lib/Analysis/PointerTracking.cpp +++ b/lib/Analysis/PointerTracking.cpp @@ -48,7 +48,7 @@ void PointerTracking::getAnalysisUsage(AnalysisUsage &AU) const { } bool PointerTracking::doInitialization(Module &M) { - const Type *PTy = PointerType::getUnqual(Type::getInt8Ty(M.getContext())); + const Type *PTy = Type::getInt8PtrTy(M.getContext()); // Find calloc(i64, i64) or calloc(i32, i32). callocFunc = M.getFunction("calloc"); diff --git a/lib/Analysis/ScalarEvolutionExpander.cpp b/lib/Analysis/ScalarEvolutionExpander.cpp index f5df026..d674ee8 100644 --- a/lib/Analysis/ScalarEvolutionExpander.cpp +++ b/lib/Analysis/ScalarEvolutionExpander.cpp @@ -464,7 +464,7 @@ Value *SCEVExpander::expandAddToGEP(const SCEV *const *op_begin, if (!AnyNonZeroIndices) { // Cast the base to i8*. V = InsertNoopCastOfTo(V, - Type::getInt8Ty(Ty->getContext())->getPointerTo(PTy->getAddressSpace())); + Type::getInt8PtrTy(Ty->getContext(), PTy->getAddressSpace())); // Expand the operands for a plain byte offset. Value *Idx = expandCodeFor(SE.getAddExpr(Ops), Ty); |