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 | 2acc6e3feda5e4f7d9009bdcf8b1cd777fecfe2d (patch) | |
tree | ff3b5c99b29349c6c5806be7168b466cf4f8d31b /lib/CodeGen/CGStmt.cpp | |
parent | b5f65475d25b67f87e368daa1583b762af7e2e45 (diff) |
de-constify llvm::Type, patch by David Blaikie!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135370 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGStmt.cpp')
-rw-r--r-- | lib/CodeGen/CGStmt.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/CodeGen/CGStmt.cpp b/lib/CodeGen/CGStmt.cpp index 07bddb7972..d56c4bbe01 100644 --- a/lib/CodeGen/CGStmt.cpp +++ b/lib/CodeGen/CGStmt.cpp @@ -1301,7 +1301,7 @@ CodeGenFunction::EmitAsmInputLValue(const AsmStmt &S, if (!CodeGenFunction::hasAggregateLLVMType(InputType)) { Arg = EmitLoadOfLValue(InputValue).getScalarVal(); } else { - const llvm::Type *Ty = ConvertType(InputType); + llvm::Type *Ty = ConvertType(InputType); uint64_t Size = CGM.getTargetData().getTypeSizeInBits(Ty); if (Size <= 64 && llvm::isPowerOf2_64(Size)) { Ty = llvm::IntegerType::get(getLLVMContext(), Size); @@ -1530,14 +1530,14 @@ void CodeGenFunction::EmitAsmStmt(const AsmStmt &S) { // Use ptrtoint as appropriate so that we can do our extension. if (isa<llvm::PointerType>(Arg->getType())) Arg = Builder.CreatePtrToInt(Arg, IntPtrTy); - const llvm::Type *OutputTy = ConvertType(OutputType); + llvm::Type *OutputTy = ConvertType(OutputType); if (isa<llvm::IntegerType>(OutputTy)) Arg = Builder.CreateZExt(Arg, OutputTy); else Arg = Builder.CreateFPExt(Arg, OutputTy); } } - if (const llvm::Type* AdjTy = + if (llvm::Type* AdjTy = getTargetHooks().adjustInlineAsmType(*this, InputConstraint, Arg->getType())) Arg = Builder.CreateBitCast(Arg, AdjTy); @@ -1577,7 +1577,7 @@ void CodeGenFunction::EmitAsmStmt(const AsmStmt &S) { Constraints += MachineClobbers; } - const llvm::Type *ResultType; + llvm::Type *ResultType; if (ResultRegTypes.empty()) ResultType = llvm::Type::getVoidTy(getLLVMContext()); else if (ResultRegTypes.size() == 1) @@ -1585,7 +1585,7 @@ void CodeGenFunction::EmitAsmStmt(const AsmStmt &S) { else ResultType = llvm::StructType::get(getLLVMContext(), ResultRegTypes); - const llvm::FunctionType *FTy = + llvm::FunctionType *FTy = llvm::FunctionType::get(ResultType, ArgTypes, false); llvm::InlineAsm *IA = @@ -1615,7 +1615,7 @@ void CodeGenFunction::EmitAsmStmt(const AsmStmt &S) { // If the result type of the LLVM IR asm doesn't match the result type of // the expression, do the conversion. if (ResultRegTypes[i] != ResultTruncRegTypes[i]) { - const llvm::Type *TruncTy = ResultTruncRegTypes[i]; + llvm::Type *TruncTy = ResultTruncRegTypes[i]; // Truncate the integer result to the right size, note that TruncTy can be // a pointer. |