diff options
| author | Jay Foad <jay.foad@gmail.com> | 2011-07-11 09:56:20 +0000 |
|---|---|---|
| committer | Jay Foad <jay.foad@gmail.com> | 2011-07-11 09:56:20 +0000 |
| commit | 7c57be3e2b6f3001cdb1e78b921f9e7ccc84f32c (patch) | |
| tree | 78c4de58c0ef5727e68c34792646f069b2fde448 /llvm/lib/Target | |
| parent | dd8fc04e9bf9b5288bb73bcd0d2a1e079b5a0750 (diff) | |
| download | llvm-7c57be3e2b6f3001cdb1e78b921f9e7ccc84f32c.zip llvm-7c57be3e2b6f3001cdb1e78b921f9e7ccc84f32c.tar.gz llvm-7c57be3e2b6f3001cdb1e78b921f9e7ccc84f32c.tar.bz2 | |
De-constify Types in StructType::get() and TargetData::getIntPtrType().
llvm-svn: 134893
Diffstat (limited to 'llvm/lib/Target')
| -rw-r--r-- | llvm/lib/Target/ARM/ARMGlobalMerge.cpp | 4 | ||||
| -rw-r--r-- | llvm/lib/Target/TargetData.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Target/ARM/ARMGlobalMerge.cpp b/llvm/lib/Target/ARM/ARMGlobalMerge.cpp index f899379..8d77b2d 100644 --- a/llvm/lib/Target/ARM/ARMGlobalMerge.cpp +++ b/llvm/lib/Target/ARM/ARMGlobalMerge.cpp @@ -128,10 +128,10 @@ bool ARMGlobalMerge::doMerge(SmallVectorImpl<GlobalVariable*> &Globals, for (size_t i = 0, e = Globals.size(); i != e; ) { size_t j = 0; uint64_t MergedSize = 0; - std::vector<const Type*> Tys; + std::vector<Type*> Tys; std::vector<Constant*> Inits; for (j = i; j != e; ++j) { - const Type *Ty = Globals[j]->getType()->getElementType(); + Type *Ty = Globals[j]->getType()->getElementType(); MergedSize += TD->getTypeAllocSize(Ty); if (MergedSize > MaxOffset) { break; diff --git a/llvm/lib/Target/TargetData.cpp b/llvm/lib/Target/TargetData.cpp index 6309a15..b2c4b21 100644 --- a/llvm/lib/Target/TargetData.cpp +++ b/llvm/lib/Target/TargetData.cpp @@ -535,7 +535,7 @@ unsigned TargetData::getPreferredTypeAlignmentShift(const Type *Ty) const { /// getIntPtrType - Return an unsigned integer type that is the same size or /// greater to the host pointer size. -const IntegerType *TargetData::getIntPtrType(LLVMContext &C) const { +IntegerType *TargetData::getIntPtrType(LLVMContext &C) const { return IntegerType::get(C, getPointerSizeInBits()); } |
