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 /clang/lib/CodeGen/CGExprConstant.cpp | |
| parent | dd8fc04e9bf9b5288bb73bcd0d2a1e079b5a0750 (diff) | |
| download | bcm5719-llvm-7c57be3e2b6f3001cdb1e78b921f9e7ccc84f32c.tar.gz bcm5719-llvm-7c57be3e2b6f3001cdb1e78b921f9e7ccc84f32c.zip | |
De-constify Types in StructType::get() and TargetData::getIntPtrType().
llvm-svn: 134893
Diffstat (limited to 'clang/lib/CodeGen/CGExprConstant.cpp')
| -rw-r--r-- | clang/lib/CodeGen/CGExprConstant.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CGExprConstant.cpp b/clang/lib/CodeGen/CGExprConstant.cpp index 42e1450125b..8f27a514740 100644 --- a/clang/lib/CodeGen/CGExprConstant.cpp +++ b/clang/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(), |

