mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-15 05:24:01 +00:00
Large mechanical patch.
s/ParamAttr/Attribute/g s/PAList/AttrList/g s/FnAttributeWithIndex/AttributeWithIndex/g s/FnAttr/Attribute/g This sets the stage - to implement function notes as function attributes and - to distinguish between function attributes and return value attributes. This requires corresponding changes in llvm-gcc and clang. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56622 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -47,7 +47,7 @@ ValueEnumerator::ValueEnumerator(const Module *M) {
|
||||
// Enumerate the functions.
|
||||
for (Module::const_iterator I = M->begin(), E = M->end(); I != E; ++I) {
|
||||
EnumerateValue(I);
|
||||
EnumerateParamAttrs(cast<Function>(I)->getParamAttrs());
|
||||
EnumerateAttributes(cast<Function>(I)->getAttributes());
|
||||
}
|
||||
|
||||
// Enumerate the aliases.
|
||||
@ -90,9 +90,9 @@ ValueEnumerator::ValueEnumerator(const Module *M) {
|
||||
EnumerateOperandType(*OI);
|
||||
EnumerateType(I->getType());
|
||||
if (const CallInst *CI = dyn_cast<CallInst>(I))
|
||||
EnumerateParamAttrs(CI->getParamAttrs());
|
||||
EnumerateAttributes(CI->getAttributes());
|
||||
else if (const InvokeInst *II = dyn_cast<InvokeInst>(I))
|
||||
EnumerateParamAttrs(II->getParamAttrs());
|
||||
EnumerateAttributes(II->getAttributes());
|
||||
}
|
||||
}
|
||||
|
||||
@ -247,14 +247,14 @@ void ValueEnumerator::EnumerateOperandType(const Value *V) {
|
||||
}
|
||||
}
|
||||
|
||||
void ValueEnumerator::EnumerateParamAttrs(const PAListPtr &PAL) {
|
||||
void ValueEnumerator::EnumerateAttributes(const AttrListPtr &PAL) {
|
||||
if (PAL.isEmpty()) return; // null is always 0.
|
||||
// Do a lookup.
|
||||
unsigned &Entry = ParamAttrMap[PAL.getRawPointer()];
|
||||
unsigned &Entry = AttributeMap[PAL.getRawPointer()];
|
||||
if (Entry == 0) {
|
||||
// Never saw this before, add it.
|
||||
ParamAttrs.push_back(PAL);
|
||||
Entry = ParamAttrs.size();
|
||||
Attributes.push_back(PAL);
|
||||
Entry = Attributes.size();
|
||||
}
|
||||
}
|
||||
|
||||
@ -303,7 +303,7 @@ void ValueEnumerator::incorporateFunction(const Function &F) {
|
||||
|
||||
// Add the function's parameter attributes so they are available for use in
|
||||
// the function's instruction.
|
||||
EnumerateParamAttrs(F.getParamAttrs());
|
||||
EnumerateAttributes(F.getAttributes());
|
||||
|
||||
FirstInstID = Values.size();
|
||||
|
||||
|
Reference in New Issue
Block a user