aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Analysis/Lint.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2011-07-18 04:54:35 +0000
committerChris Lattner <sabre@nondot.org>2011-07-18 04:54:35 +0000
commitdb125cfaf57cc83e7dd7453de2d509bc8efd0e5e (patch)
treea163ac0f83da7be3f9675a122a6144b12418be09 /lib/Analysis/Lint.cpp
parent4b3d5469fb7c25504fa20dc65640f02d79675d48 (diff)
downloadexternal_llvm-db125cfaf57cc83e7dd7453de2d509bc8efd0e5e.zip
external_llvm-db125cfaf57cc83e7dd7453de2d509bc8efd0e5e.tar.gz
external_llvm-db125cfaf57cc83e7dd7453de2d509bc8efd0e5e.tar.bz2
land David Blaikie's patch to de-constify Type, with a few tweaks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135375 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/Lint.cpp')
-rw-r--r--lib/Analysis/Lint.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Analysis/Lint.cpp b/lib/Analysis/Lint.cpp
index 89755da..38d677d 100644
--- a/lib/Analysis/Lint.cpp
+++ b/lib/Analysis/Lint.cpp
@@ -71,7 +71,7 @@ namespace {
void visitCallSite(CallSite CS);
void visitMemoryReference(Instruction &I, Value *Ptr,
uint64_t Size, unsigned Align,
- const Type *Ty, unsigned Flags);
+ Type *Ty, unsigned Flags);
void visitCallInst(CallInst &I);
void visitInvokeInst(InvokeInst &I);
@@ -201,7 +201,7 @@ void Lint::visitCallSite(CallSite CS) {
"Undefined behavior: Caller and callee calling convention differ",
&I);
- const FunctionType *FT = F->getFunctionType();
+ FunctionType *FT = F->getFunctionType();
unsigned NumActualArgs = unsigned(CS.arg_end()-CS.arg_begin());
Assert1(FT->isVarArg() ?
@@ -240,7 +240,7 @@ void Lint::visitCallSite(CallSite CS) {
// Check that an sret argument points to valid memory.
if (Formal->hasStructRetAttr() && Actual->getType()->isPointerTy()) {
- const Type *Ty =
+ Type *Ty =
cast<PointerType>(Formal->getType())->getElementType();
visitMemoryReference(I, Actual, AA->getTypeStoreSize(Ty),
TD ? TD->getABITypeAlignment(Ty) : 0,
@@ -364,7 +364,7 @@ void Lint::visitReturnInst(ReturnInst &I) {
// TODO: Check readnone/readonly function attributes.
void Lint::visitMemoryReference(Instruction &I,
Value *Ptr, uint64_t Size, unsigned Align,
- const Type *Ty, unsigned Flags) {
+ Type *Ty, unsigned Flags) {
// If no memory is being referenced, it doesn't matter if the pointer
// is valid.
if (Size == 0)