mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 22:24:07 +00:00
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
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user