[llvm-commits] [llvm-gcc-4.2] r46415 - /llvm-gcc-4.2/trunk/gcc/llvm-types.cpp
Chris Lattner
clattner at apple.com
Sun Jan 27 10:41:07 PST 2008
> URL: http://llvm.org/viewvc/llvm-project?rev=46415&view=rev
> Log:
> Do not mark a function readnone or readonly if it has
> a byval parameter.
Thanks Duncan:
> + uint16_t &RAttrs = Attrs[0].attrs;
> + RAttrs &= ~(ParamAttr::ReadNone | ParamAttr::ReadOnly);
> + if (RAttrs == ParamAttr::None) {
> + for (unsigned i = 1, e = Attrs.size(); i < e ; ++i)
> + Attrs[i-1] = Attrs[i];
> + Attrs.pop_back();
> + }
How about:
if (RAttrs == ParamAttr::None)
Attrs.erase(Attrs.begin());
?
-Chris
More information about the llvm-commits
mailing list