Rename the 'Attributes' class to 'Attribute'. It's going to represent a single attrib...
[oota-llvm.git] / lib / Transforms / Instrumentation / MemorySanitizer.cpp
index 59902269a0289d8557f30d11e5fec5e44606a3b5..ae63977377d1002a3554ce4f08b5bd420c0c3a5a 100644 (file)
@@ -1260,10 +1260,10 @@ struct MemorySanitizerVisitor : public InstVisitor<MemorySanitizerVisitor> {
       if (Function *Func = Call->getCalledFunction()) {
         // Clear out readonly/readnone attributes.
         AttrBuilder B;
-        B.addAttribute(Attributes::ReadOnly)
-          .addAttribute(Attributes::ReadNone);
+        B.addAttribute(Attribute::ReadOnly)
+          .addAttribute(Attribute::ReadNone);
         Func->removeAttribute(AttributeSet::FunctionIndex,
-                              Attributes::get(Func->getContext(), B));
+                              Attribute::get(Func->getContext(), B));
       }
     }
     IRBuilder<> IRB(&I);
@@ -1286,7 +1286,7 @@ struct MemorySanitizerVisitor : public InstVisitor<MemorySanitizerVisitor> {
       Value *ArgShadowBase = getShadowPtrForArgument(A, IRB, ArgOffset);
       DEBUG(dbgs() << "  Arg#" << i << ": " << *A <<
             " Shadow: " << *ArgShadow << "\n");
-      if (CS.paramHasAttr(i + 1, Attributes::ByVal)) {
+      if (CS.paramHasAttr(i + 1, Attribute::ByVal)) {
         assert(A->getType()->isPointerTy() &&
                "ByVal argument is not a pointer!");
         Size = MS.TD->getTypeAllocSize(A->getType()->getPointerElementType());
@@ -1643,10 +1643,10 @@ bool MemorySanitizer::runOnFunction(Function &F) {
 
   // Clear out readonly/readnone attributes.
   AttrBuilder B;
-  B.addAttribute(Attributes::ReadOnly)
-    .addAttribute(Attributes::ReadNone);
+  B.addAttribute(Attribute::ReadOnly)
+    .addAttribute(Attribute::ReadNone);
   F.removeAttribute(AttributeSet::FunctionIndex,
-                    Attributes::get(F.getContext(), B));
+                    Attribute::get(F.getContext(), B));
 
   return Visitor.runOnFunction();
 }