Use the predicate methods off of AttributeSet instead of Attribute.
[oota-llvm.git] / lib / VMCore / Core.cpp
index 60a8483aba5a8f85ac4fadeb107fdb198fe35498..a1e9cf3f3596da59296376accd7c1a1e28d53cc6 100644 (file)
@@ -1476,9 +1476,8 @@ void LLVMRemoveAttribute(LLVMValueRef Arg, LLVMAttribute PA) {
 
 LLVMAttribute LLVMGetAttribute(LLVMValueRef Arg) {
   Argument *A = unwrap<Argument>(Arg);
-  Attribute attr = A->getParent()->getAttributes().getParamAttributes(
-    A->getArgNo()+1);
-  return (LLVMAttribute)attr.getBitMask();
+  return (LLVMAttribute)A->getParent()->getAttributes().
+    getBitMask(A->getArgNo()+1);
 }