Author: johannes Date: Sat Dec 15 14:53:03 2007 New Revision: 45061 URL: http://llvm.org/viewvc/llvm-project?rev=45061&view=rev Log: Fix thinko in previous patch.
Modified: llvm-gcc-4.2/trunk/gcc/llvm-types.cpp Modified: llvm-gcc-4.2/trunk/gcc/llvm-types.cpp URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-types.cpp?rev=45061&r1=45060&r2=45061&view=diff ============================================================================== --- llvm-gcc-4.2/trunk/gcc/llvm-types.cpp (original) +++ llvm-gcc-4.2/trunk/gcc/llvm-types.cpp Sat Dec 15 14:53:03 2007 @@ -1075,14 +1075,14 @@ // is in fact const, so this should be valid (and gcc // accepts it). But llvm IR does not allow both, so // set only ReadNone. - if (flags & ECF_CONST && !(flags & ECF_PURE)) + if (flags & ECF_CONST) // Since they write the return value through a pointer, // 'sret' functions cannot be 'readnone'. if (!ABIConverter.isStructReturn()) RAttributes |= ParamAttr::ReadNone; // Check for 'readonly' function attribute. - if (flags & ECF_PURE) + if (flags & ECF_PURE && !(flags & ECF_CONST)) // Since they write the return value through a pointer, // 'sret' functions cannot be 'readonly'. if (!ABIConverter.isStructReturn()) _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits