[llvm-commits] [llvm] r165896 - in /llvm/trunk: include/llvm/Attributes.h lib/Transforms/IPO/DeadArgumentElimination.cpp lib/Transforms/InstCombine/InstCombineCalls.cpp lib/VMCore/Attributes.cpp lib/VMCore/Verifier.cpp
Bill Wendling
isanbard at gmail.com
Sun Oct 14 00:52:48 PDT 2012
Author: void
Date: Sun Oct 14 02:52:48 2012
New Revision: 165896
URL: http://llvm.org/viewvc/llvm-project?rev=165896&view=rev
Log:
Remove the bitwise AND operators from the Attributes class. Replace it with the equivalent from the builder class.
Modified:
llvm/trunk/include/llvm/Attributes.h
llvm/trunk/lib/Transforms/IPO/DeadArgumentElimination.cpp
llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp
llvm/trunk/lib/VMCore/Attributes.cpp
llvm/trunk/lib/VMCore/Verifier.cpp
Modified: llvm/trunk/include/llvm/Attributes.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Attributes.h?rev=165896&r1=165895&r2=165896&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Attributes.h (original)
+++ llvm/trunk/include/llvm/Attributes.h Sun Oct 14 02:52:48 2012
@@ -235,9 +235,6 @@
return Attrs.Bits != A.Attrs.Bits;
}
- Attributes operator & (const Attributes &A) const;
- Attributes &operator &= (const Attributes &A);
-
uint64_t Raw() const;
/// @brief Which attributes cannot be applied to a type.
Modified: llvm/trunk/lib/Transforms/IPO/DeadArgumentElimination.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/DeadArgumentElimination.cpp?rev=165896&r1=165895&r2=165896&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/DeadArgumentElimination.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/DeadArgumentElimination.cpp Sun Oct 14 02:52:48 2012
@@ -766,8 +766,9 @@
Attributes::get(Attributes::Builder(RAttrs).
removeAttributes(Attributes::typeIncompatible(NRetTy)));
else
- assert((RAttrs & Attributes::typeIncompatible(NRetTy)) == 0
- && "Return attributes no longer compatible?");
+ assert(!Attributes::Builder(RAttrs).
+ hasAttributes(Attributes::typeIncompatible(NRetTy)) &&
+ "Return attributes no longer compatible?");
if (RAttrs)
AttributesVec.push_back(AttributeWithIndex::get(0, RAttrs));
Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp?rev=165896&r1=165895&r2=165896&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp (original)
+++ llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp Sun Oct 14 02:52:48 2012
@@ -1038,7 +1038,8 @@
return false; // Cannot transform this parameter value.
Attributes Attrs = CallerPAL.getParamAttributes(i + 1);
- if (Attrs & Attributes::typeIncompatible(ParamTy))
+ if (Attributes::Builder(Attrs).
+ hasAttributes(Attributes::typeIncompatible(ParamTy)))
return false; // Attribute not compatible with transformed value.
// If the parameter is passed as a byval argument, then we have to have a
Modified: llvm/trunk/lib/VMCore/Attributes.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Attributes.cpp?rev=165896&r1=165895&r2=165896&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/Attributes.cpp (original)
+++ llvm/trunk/lib/VMCore/Attributes.cpp Sun Oct 14 02:52:48 2012
@@ -93,14 +93,6 @@
return Attrs.isEmptyOrSingleton();
}
-Attributes Attributes::operator & (const Attributes &A) const {
- return Attributes(Raw() & A.Raw());
-}
-Attributes &Attributes::operator &= (const Attributes &A) {
- Attrs.Bits &= A.Raw();
- return *this;
-}
-
uint64_t Attributes::Raw() const {
return Attrs.Bits;
}
Modified: llvm/trunk/lib/VMCore/Verifier.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Verifier.cpp?rev=165896&r1=165895&r2=165896&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/Verifier.cpp (original)
+++ llvm/trunk/lib/VMCore/Verifier.cpp Sun Oct 14 02:52:48 2012
@@ -567,9 +567,10 @@
Attrs.hasAttribute(Attributes::AlwaysInline)), "Attributes "
"'noinline and alwaysinline' are incompatible!", V);
- Attributes TypeI = Attrs & Attributes::typeIncompatible(Ty);
- Assert1(!TypeI, "Wrong type for attribute " +
- TypeI.getAsString(), V);
+ Assert1(!Attributes::Builder(Attrs).
+ hasAttributes(Attributes::typeIncompatible(Ty)),
+ "Wrong types for attribute: " +
+ Attributes::typeIncompatible(Ty).getAsString(), V);
if (PointerType *PTy = dyn_cast<PointerType>(Ty))
Assert1(!Attrs.hasAttribute(Attributes::ByVal) ||
More information about the llvm-commits
mailing list