diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2014-02-24 23:12:18 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2014-02-24 23:12:18 +0000 |
commit | ec89b9fb9ed78dbb783897774e5d7bab376c169a (patch) | |
tree | 6ab3132fd7791591b13760a39010a72abbabcc1f /lib/Transforms/InstCombine | |
parent | 70b3b7d06fab76efa08c21d75242ab3a64d8cf91 (diff) | |
download | llvm-ec89b9fb9ed78dbb783897774e5d7bab376c169a.tar.gz llvm-ec89b9fb9ed78dbb783897774e5d7bab376c169a.tar.bz2 llvm-ec89b9fb9ed78dbb783897774e5d7bab376c169a.tar.xz |
Make some DataLayout pointers const.
No functionality change. Just reduces the noise of an upcoming patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202087 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/InstCombine')
-rw-r--r-- | lib/Transforms/InstCombine/InstCombine.h | 4 | ||||
-rw-r--r-- | lib/Transforms/InstCombine/InstCombineCasts.cpp | 2 | ||||
-rw-r--r-- | lib/Transforms/InstCombine/InstCombineCompares.cpp | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/lib/Transforms/InstCombine/InstCombine.h b/lib/Transforms/InstCombine/InstCombine.h index 241db7a6a5..2a4b8a146d 100644 --- a/lib/Transforms/InstCombine/InstCombine.h +++ b/lib/Transforms/InstCombine/InstCombine.h @@ -81,7 +81,7 @@ public: class LLVM_LIBRARY_VISIBILITY InstCombiner : public FunctionPass, public InstVisitor<InstCombiner, Instruction*> { - DataLayout *DL; + const DataLayout *DL; TargetLibraryInfo *TLI; bool MadeIRChange; LibCallSimplifier *Simplifier; @@ -108,7 +108,7 @@ public: virtual void getAnalysisUsage(AnalysisUsage &AU) const; - DataLayout *getDataLayout() const { return DL; } + const DataLayout *getDataLayout() const { return DL; } TargetLibraryInfo *getTargetLibraryInfo() const { return TLI; } diff --git a/lib/Transforms/InstCombine/InstCombineCasts.cpp b/lib/Transforms/InstCombine/InstCombineCasts.cpp index 5c1d1b136b..063ab171e9 100644 --- a/lib/Transforms/InstCombine/InstCombineCasts.cpp +++ b/lib/Transforms/InstCombine/InstCombineCasts.cpp @@ -235,7 +235,7 @@ isEliminableCastPair( const CastInst *CI, ///< The first cast instruction unsigned opcode, ///< The opcode of the second cast instruction Type *DstTy, ///< The target type for the second cast instruction - DataLayout *DL ///< The target data for pointer size + const DataLayout *DL ///< The target data for pointer size ) { Type *SrcTy = CI->getOperand(0)->getType(); // A from above diff --git a/lib/Transforms/InstCombine/InstCombineCompares.cpp b/lib/Transforms/InstCombine/InstCombineCompares.cpp index 4ad58c40e4..dcd295718e 100644 --- a/lib/Transforms/InstCombine/InstCombineCompares.cpp +++ b/lib/Transforms/InstCombine/InstCombineCompares.cpp @@ -503,7 +503,7 @@ FoldCmpLoadFromIndexedGlobal(GetElementPtrInst *GEP, GlobalVariable *GV, /// If we can't emit an optimized form for this expression, this returns null. /// static Value *EvaluateGEPOffsetExpression(User *GEP, InstCombiner &IC) { - DataLayout &DL = *IC.getDataLayout(); + const DataLayout &DL = *IC.getDataLayout(); gep_type_iterator GTI = gep_type_begin(GEP); // Check to see if this gep only has a single variable index. If so, and if |