diff options
| author | Devang Patel <dpatel@apple.com> | 2008-09-25 21:00:45 +0000 |
|---|---|---|
| committer | Devang Patel <dpatel@apple.com> | 2008-09-25 21:00:45 +0000 |
| commit | 4c758ea3e0d31e56773ef74ecac1775c641377e5 (patch) | |
| tree | 0a109f93cf70b534d01a935be9d78ed558e127fe /llvm/lib/Bitcode/Writer/ValueEnumerator.cpp | |
| parent | 87001fd6fd5194a26e00c18a77e65807ca49c1c0 (diff) | |
| download | bcm5719-llvm-4c758ea3e0d31e56773ef74ecac1775c641377e5.tar.gz bcm5719-llvm-4c758ea3e0d31e56773ef74ecac1775c641377e5.zip | |
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.
llvm-svn: 56622
Diffstat (limited to 'llvm/lib/Bitcode/Writer/ValueEnumerator.cpp')
| -rw-r--r-- | llvm/lib/Bitcode/Writer/ValueEnumerator.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp b/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp index 21d0dfe7eb6..1c12bc4cd41 100644 --- a/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp +++ b/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp @@ -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(); |

