[llvm-commits] [llvm] r164735 - /llvm/trunk/include/llvm/Function.h

Bill Wendling isanbard at gmail.com
Wed Sep 26 16:38:00 PDT 2012


Author: void
Date: Wed Sep 26 18:38:00 2012
New Revision: 164735

URL: http://llvm.org/viewvc/llvm-project?rev=164735&view=rev
Log:
Buildbot Fix.

This method can be called with a '0' argument which checks the return
value. However, the method it calls doesn't expect '0' as a valid value. Call the
correct method when it's 0.

Modified:
    llvm/trunk/include/llvm/Function.h

Modified: llvm/trunk/include/llvm/Function.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Function.h?rev=164735&r1=164734&r2=164735&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Function.h (original)
+++ llvm/trunk/include/llvm/Function.h Wed Sep 26 18:38:00 2012
@@ -278,7 +278,8 @@
   /// @brief Determine if the parameter does not alias other parameters.
   /// @param n The parameter to check. 1 is the first parameter, 0 is the return
   bool doesNotAlias(unsigned n) const {
-    return getParamAttributes(n).hasNoAliasAttr();
+    return n != 0 ? getParamAttributes(n).hasNoAliasAttr() :
+      AttributeList.getRetAttributes().hasNoAliasAttr();
   }
   void setDoesNotAlias(unsigned n, bool DoesNotAlias = true) {
     if (DoesNotAlias) addAttribute(n, Attribute::NoAlias);





More information about the llvm-commits mailing list