diff options
author | Chris Lattner <sabre@nondot.org> | 2011-07-18 04:54:35 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2011-07-18 04:54:35 +0000 |
commit | 229907cd11658776a6c7451de74b9e16ba637d9c (patch) | |
tree | 56a83033fb7b2337bf90a7b23ca87e9a0e8b62f7 /llvm/lib/Transforms/Utils/InlineFunction.cpp | |
parent | 805d09459df33da12c3dc3cf6ab7806baebbe4c8 (diff) | |
download | llvm-229907cd11658776a6c7451de74b9e16ba637d9c.zip llvm-229907cd11658776a6c7451de74b9e16ba637d9c.tar.gz llvm-229907cd11658776a6c7451de74b9e16ba637d9c.tar.bz2 |
land David Blaikie's patch to de-constify Type, with a few tweaks.
llvm-svn: 135375
Diffstat (limited to 'llvm/lib/Transforms/Utils/InlineFunction.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/InlineFunction.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Utils/InlineFunction.cpp b/llvm/lib/Transforms/Utils/InlineFunction.cpp index d5b382e5..6d8a319 100644 --- a/llvm/lib/Transforms/Utils/InlineFunction.cpp +++ b/llvm/lib/Transforms/Utils/InlineFunction.cpp @@ -636,7 +636,7 @@ static Value *HandleByValArgument(Value *Arg, Instruction *TheCall, const Function *CalledFunc, InlineFunctionInfo &IFI, unsigned ByValAlignment) { - const Type *AggTy = cast<PointerType>(Arg->getType())->getElementType(); + Type *AggTy = cast<PointerType>(Arg->getType())->getElementType(); // If the called function is readonly, then it could not mutate the caller's // copy of the byval'd memory. In this case, it is safe to elide the copy and @@ -726,7 +726,7 @@ static bool isUsedByLifetimeMarker(Value *V) { // hasLifetimeMarkers - Check whether the given alloca already has // lifetime.start or lifetime.end intrinsics. static bool hasLifetimeMarkers(AllocaInst *AI) { - const Type *Int8PtrTy = Type::getInt8PtrTy(AI->getType()->getContext()); + Type *Int8PtrTy = Type::getInt8PtrTy(AI->getType()->getContext()); if (AI->getType() == Int8PtrTy) return isUsedByLifetimeMarker(AI); @@ -1090,7 +1090,7 @@ bool llvm::InlineFunction(CallSite CS, InlineFunctionInfo &IFI) { // Handle all of the return instructions that we just cloned in, and eliminate // any users of the original call/invoke instruction. - const Type *RTy = CalledFunc->getReturnType(); + Type *RTy = CalledFunc->getReturnType(); PHINode *PHI = 0; if (Returns.size() > 1) { |