From 7c57be3e2b6f3001cdb1e78b921f9e7ccc84f32c Mon Sep 17 00:00:00 2001 From: Jay Foad Date: Mon, 11 Jul 2011 09:56:20 +0000 Subject: De-constify Types in StructType::get() and TargetData::getIntPtrType(). llvm-svn: 134893 --- clang/lib/CodeGen/CGExprConstant.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'clang/lib/CodeGen/CGExprConstant.cpp') 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 Elts; - std::vector Types; + std::vector 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 Types; + std::vector Types; for (unsigned i = 0; i < Elts.size(); ++i) Types.push_back(Elts[i]->getType()); const llvm::StructType *SType = llvm::StructType::get(AType->getContext(), -- cgit v1.2.3