aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGExprConstant.cpp
diff options
context:
space:
mode:
authorJay Foad <jay.foad@gmail.com>2011-07-11 09:56:20 +0000
committerJay Foad <jay.foad@gmail.com>2011-07-11 09:56:20 +0000
commitef6de3da8572607f786303c07150daa6e140ab19 (patch)
tree1a988de7e4a765ba4b0ede16cceb797720a5e58e /lib/CodeGen/CGExprConstant.cpp
parentcdb8076dd9cfb975a1bcb3e7cb58a59648c35af0 (diff)
De-constify Types in StructType::get() and TargetData::getIntPtrType().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134893 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExprConstant.cpp')
-rw-r--r--lib/CodeGen/CGExprConstant.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/CodeGen/CGExprConstant.cpp b/lib/CodeGen/CGExprConstant.cpp
index 42e1450125..8f27a51474 100644
--- a/lib/CodeGen/CGExprConstant.cpp
+++ b/lib/CodeGen/CGExprConstant.cpp
@@ -533,7 +533,7 @@ public:
// Build a struct with the union sub-element as the first member,
// and padded to the appropriate size
std::vector<llvm::Constant*> Elts;
- std::vector<const llvm::Type*> Types;
+ std::vector<llvm::Type*> Types;
Elts.push_back(C);
Types.push_back(C->getType());
unsigned CurSize = CGM.getTargetData().getTypeAllocSize(C->getType());
@@ -541,7 +541,7 @@ public:
assert(CurSize <= TotalSize && "Union size mismatch!");
if (unsigned NumPadBytes = TotalSize - CurSize) {
- const llvm::Type *Ty = llvm::Type::getInt8Ty(VMContext);
+ llvm::Type *Ty = llvm::Type::getInt8Ty(VMContext);
if (NumPadBytes > 1)
Ty = llvm::ArrayType::get(Ty, NumPadBytes);
@@ -711,7 +711,7 @@ public:
if (RewriteType) {
// FIXME: Try to avoid packing the array
- std::vector<const llvm::Type*> Types;
+ std::vector<llvm::Type*> Types;
for (unsigned i = 0; i < Elts.size(); ++i)
Types.push_back(Elts[i]->getType());
const llvm::StructType *SType = llvm::StructType::get(AType->getContext(),