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 | 0598866c052147c31b808391f58434ce3dbfb838 (patch) | |
tree | 5a33037d52126e5eb635d76afe643d9b854694a1 /lib/Bitcode/Writer/ValueEnumerator.cpp | |
parent | 32b952a2a60d1091e0e17bb6ce788cd1d41e6f8b (diff) |
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
Diffstat (limited to 'lib/Bitcode/Writer/ValueEnumerator.cpp')
-rw-r--r-- | lib/Bitcode/Writer/ValueEnumerator.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/Bitcode/Writer/ValueEnumerator.cpp b/lib/Bitcode/Writer/ValueEnumerator.cpp index 21d0dfe7eb..1c12bc4cd4 100644 --- a/lib/Bitcode/Writer/ValueEnumerator.cpp +++ b/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(); |