Revert "[FastIsel][X86] Add support for lowering the first 8 floating-point arguments."
[oota-llvm.git] / lib / IR / Function.cpp
index de8e66f1bca0f2c96ac8776d126a0b0adda82493..fe32c4613e72f9a61422c5f4bb845f4cda997951 100644 (file)
@@ -76,6 +76,14 @@ unsigned Argument::getArgNo() const {
   return ArgIdx;
 }
 
+/// hasNonNullAttr - Return true if this argument has the nonnull attribute on
+/// it in its containing function.
+bool Argument::hasNonNullAttr() const {
+  if (!getType()->isPointerTy()) return false;
+  return getParent()->getAttributes().
+    hasAttribute(getArgNo()+1, Attribute::NonNull);
+}
+
 /// hasByValAttr - Return true if this argument has the byval attribute on it
 /// in its containing function.
 bool Argument::hasByValAttr() const {