diff options
| author | Chris Lattner <sabre@nondot.org> | 2011-07-18 04:24:23 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2011-07-18 04:24:23 +0000 |
| commit | 2192fe50dac0e0333f013a025619faf5a574c7d4 (patch) | |
| tree | ae1044f0d276b7f9b27464c69bea49cacb1729cc /clang/lib/CodeGen/CodeGenFunction.cpp | |
| parent | 2cf16c90f9f650b173560ec63ac9b6bec3574707 (diff) | |
| download | llvm-2192fe50dac0e0333f013a025619faf5a574c7d4.zip llvm-2192fe50dac0e0333f013a025619faf5a574c7d4.tar.gz llvm-2192fe50dac0e0333f013a025619faf5a574c7d4.tar.bz2 | |
de-constify llvm::Type, patch by David Blaikie!
llvm-svn: 135370
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
| -rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp index 702897a..d580ce3 100644 --- a/clang/lib/CodeGen/CodeGenFunction.cpp +++ b/clang/lib/CodeGen/CodeGenFunction.cpp @@ -215,7 +215,7 @@ void CodeGenFunction::EmitFunctionInstrumentation(const char *Fn) { // void __cyg_profile_func_{enter,exit} (void *this_fn, void *call_site); llvm::PointerType *PointerTy = Int8PtrTy; llvm::Type *ProfileFuncArgs[] = { PointerTy, PointerTy }; - const llvm::FunctionType *FunctionTy = + llvm::FunctionType *FunctionTy = llvm::FunctionType::get(llvm::Type::getVoidTy(getLLVMContext()), ProfileFuncArgs, false); @@ -645,7 +645,7 @@ static void emitNonZeroVLAInit(CodeGenFunction &CGF, QualType baseType, llvm::Value *baseSizeInChars = llvm::ConstantInt::get(CGF.IntPtrTy, baseSizeAndAlign.first.getQuantity()); - const llvm::Type *i8p = Builder.getInt8PtrTy(); + llvm::Type *i8p = Builder.getInt8PtrTy(); llvm::Value *begin = Builder.CreateBitCast(dest, i8p, "vla.begin"); llvm::Value *end = Builder.CreateInBoundsGEP(dest, sizeInChars, "vla.end"); @@ -690,7 +690,7 @@ CodeGenFunction::EmitNullInitialization(llvm::Value *DestPtr, QualType Ty) { // Cast the dest ptr to the appropriate i8 pointer type. unsigned DestAS = cast<llvm::PointerType>(DestPtr->getType())->getAddressSpace(); - const llvm::Type *BP = Builder.getInt8PtrTy(DestAS); + llvm::Type *BP = Builder.getInt8PtrTy(DestAS); if (DestPtr->getType() != BP) DestPtr = Builder.CreateBitCast(DestPtr, BP, "tmp"); @@ -828,7 +828,7 @@ llvm::Value *CodeGenFunction::emitArrayLength(const ArrayType *origArrayType, // constant-length arrays than to re-evaluate the array bounds. uint64_t countFromCLAs = 1; - const llvm::ArrayType *llvmArrayType = + llvm::ArrayType *llvmArrayType = cast<llvm::ArrayType>( cast<llvm::PointerType>(addr->getType())->getElementType()); while (true) { |
