mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-19 08:35:45 +00:00
Fix PR1146: parameter attributes are longer part of
the function type, instead they belong to functions and function calls. This is an updated and slightly corrected version of Reid Spencer's original patch. The only known problem is that auto-upgrading of bitcode files doesn't seem to work properly (see test/Bitcode/AutoUpgradeIntrinsics.ll). Hopefully a bitcode guru (who might that be? :) ) will fix it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44359 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -268,7 +268,7 @@ BasicAliasAnalysis::getModRefInfo(CallSite CS, Value *P, unsigned Size) {
|
||||
|
||||
static bool isNoAliasArgument(const Argument *Arg) {
|
||||
const Function *Func = Arg->getParent();
|
||||
const ParamAttrsList *Attr = Func->getFunctionType()->getParamAttrs();
|
||||
const ParamAttrsList *Attr = Func->getParamAttrs();
|
||||
if (Attr) {
|
||||
unsigned Idx = 1;
|
||||
for (Function::const_arg_iterator I = Func->arg_begin(),
|
||||
@@ -839,7 +839,7 @@ BasicAliasAnalysis::getModRefBehavior(Function *F, CallSite CS,
|
||||
return UnknownModRefBehavior;
|
||||
}
|
||||
|
||||
const ParamAttrsList *Attrs = F->getFunctionType()->getParamAttrs();
|
||||
const ParamAttrsList *Attrs = F->getParamAttrs();
|
||||
if (Attrs && Attrs->paramHasAttr(0, ParamAttr::ReadNone))
|
||||
return DoesNotAccessMemory;
|
||||
if (Attrs && Attrs->paramHasAttr(0, ParamAttr::ReadOnly))
|
||||
|
||||
Reference in New Issue
Block a user