summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2012-10-14 06:56:13 +0000
committerBill Wendling <isanbard@gmail.com>2012-10-14 06:56:13 +0000
commit3756e70af69096a82b367ee9667e7720ca2201e4 (patch)
tree29f303e2220864bbb1ac363d36d47996f572b102
parent5886b7bfc82385dfd35b7602304c86075e1d72e6 (diff)
downloadllvm-3756e70af69096a82b367ee9667e7720ca2201e4.tar.gz
llvm-3756e70af69096a82b367ee9667e7720ca2201e4.tar.bz2
llvm-3756e70af69096a82b367ee9667e7720ca2201e4.tar.xz
Remove the bitwise XOR operator from the Attributes class. Replace it with the equivalent from the builder class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165893 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/Attributes.h1
-rw-r--r--lib/CodeGen/Analysis.cpp4
-rw-r--r--lib/Transforms/Scalar/CodeGenPrepare.cpp6
-rw-r--r--lib/VMCore/Attributes.cpp3
4 files changed, 6 insertions, 8 deletions
diff --git a/include/llvm/Attributes.h b/include/llvm/Attributes.h
index 5b614e9107..c8f723a7dc 100644
--- a/include/llvm/Attributes.h
+++ b/include/llvm/Attributes.h
@@ -236,7 +236,6 @@ public:
Attributes operator | (const Attributes &A) const;
Attributes operator & (const Attributes &A) const;
- Attributes operator ^ (const Attributes &A) const;
Attributes &operator |= (const Attributes &A);
Attributes &operator &= (const Attributes &A);
diff --git a/lib/CodeGen/Analysis.cpp b/lib/CodeGen/Analysis.cpp
index 09e30eba57..110a294020 100644
--- a/lib/CodeGen/Analysis.cpp
+++ b/lib/CodeGen/Analysis.cpp
@@ -314,8 +314,8 @@ bool llvm::isInTailCallPosition(ImmutableCallSite CS, Attributes CalleeRetAttr,
// the return. Ignore noalias because it doesn't affect the call sequence.
const Function *F = ExitBB->getParent();
Attributes CallerRetAttr = F->getAttributes().getRetAttributes();
- if (Attributes::Builder(CalleeRetAttr ^ CallerRetAttr)
- .removeAttribute(Attributes::NoAlias).hasAttributes())
+ if (Attributes::Builder(CalleeRetAttr).removeAttribute(Attributes::NoAlias) !=
+ Attributes::Builder(CallerRetAttr).removeAttribute(Attributes::NoAlias))
return false;
// It's not safe to eliminate the sign / zero extension of the return value.
diff --git a/lib/Transforms/Scalar/CodeGenPrepare.cpp b/lib/Transforms/Scalar/CodeGenPrepare.cpp
index 4d31444b76..665d5b0171 100644
--- a/lib/Transforms/Scalar/CodeGenPrepare.cpp
+++ b/lib/Transforms/Scalar/CodeGenPrepare.cpp
@@ -774,8 +774,10 @@ bool CodeGenPrepare::DupRetToEnableTailCallOpts(ReturnInst *RI) {
// Conservatively require the attributes of the call to match those of the
// return. Ignore noalias because it doesn't affect the call sequence.
Attributes CalleeRetAttr = CS.getAttributes().getRetAttributes();
- if (Attributes::Builder(CalleeRetAttr ^ CallerRetAttr)
- .removeAttribute(Attributes::NoAlias).hasAttributes())
+ if (Attributes::Builder(CalleeRetAttr).
+ removeAttribute(Attributes::NoAlias) !=
+ Attributes::Builder(CallerRetAttr).
+ removeAttribute(Attributes::NoAlias))
continue;
// Make sure the call instruction is followed by an unconditional branch to
diff --git a/lib/VMCore/Attributes.cpp b/lib/VMCore/Attributes.cpp
index 326afc7ba9..e70efc54fa 100644
--- a/lib/VMCore/Attributes.cpp
+++ b/lib/VMCore/Attributes.cpp
@@ -99,9 +99,6 @@ Attributes Attributes::operator | (const Attributes &A) const {
Attributes Attributes::operator & (const Attributes &A) const {
return Attributes(Raw() & A.Raw());
}
-Attributes Attributes::operator ^ (const Attributes &A) const {
- return Attributes(Raw() ^ A.Raw());
-}
Attributes &Attributes::operator |= (const Attributes &A) {
Attrs.Bits |= A.Raw();
return *this;