[llvm-commits] [llvm-gcc-4.2] r56933 - /llvm-gcc-4.2/trunk/gcc/llvm-types.cpp
Devang Patel
dpatel at apple.com
Wed Oct 1 14:09:38 PDT 2008
Author: dpatel
Date: Wed Oct 1 16:09:38 2008
New Revision: 56933
URL: http://llvm.org/viewvc/llvm-project?rev=56933&view=rev
Log:
Now, ReadNone and ReadOnly are function attributes.
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=56933&r1=56932&r2=56933&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-types.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-types.cpp Wed Oct 1 16:09:38 2008
@@ -1268,12 +1268,8 @@
// write to struct arguments passed by value, but in LLVM this becomes a
// write through the byval pointer argument, which LLVM does not allow for
// readonly/readnone functions.
- if (HasByVal && Attrs[0].Index == 0) {
- Attributes &RAttrs = Attrs[0].Attrs;
- RAttrs &= ~(Attribute::ReadNone | Attribute::ReadOnly);
- if (RAttrs == Attribute::None)
- Attrs.erase(Attrs.begin());
- }
+ if (HasByVal)
+ FnAttributes &= ~(Attribute::ReadNone | Attribute::ReadOnly);
// If the argument list ends with a void type node, it isn't vararg.
isVarArg = (Args == 0);
More information about the llvm-commits
mailing list