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
diff --git a/lib/Bitcode/Writer/ValueEnumerator.cpp b/lib/Bitcode/Writer/ValueEnumerator.cpp
index 21d0dfe..1c12bc4 100644
--- a/lib/Bitcode/Writer/ValueEnumerator.cpp
+++ b/lib/Bitcode/Writer/ValueEnumerator.cpp
@@ -47,7 +47,7 @@
   // 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 @@
           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::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 @@
   
   // 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();