summaryrefslogtreecommitdiffstats
path: root/llvm
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
commita05b043c4a44abfff773134aa48e8bbd69f36d42 (patch)
treef68f65777dd8e4a57cf02bc3b9496822e7468dc5 /llvm
parent85a64c217f5fec92934ad3a12c5c8ebcc8f1fd9f (diff)
downloadbcm5719-llvm-a05b043c4a44abfff773134aa48e8bbd69f36d42.tar.gz
bcm5719-llvm-a05b043c4a44abfff773134aa48e8bbd69f36d42.zip
Remove the bitwise XOR operator from the Attributes class. Replace it with the equivalent from the builder class.
llvm-svn: 165893
Diffstat (limited to 'llvm')
-rw-r--r--llvm/include/llvm/Attributes.h1
-rw-r--r--llvm/lib/CodeGen/Analysis.cpp4
-rw-r--r--llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp6
-rw-r--r--llvm/lib/VMCore/Attributes.cpp3
4 files changed, 6 insertions, 8 deletions
diff --git a/llvm/include/llvm/Attributes.h b/llvm/include/llvm/Attributes.h
index 5b614e91072..c8f723a7dcf 100644
--- a/llvm/include/llvm/Attributes.h
+++ b/llvm/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/llvm/lib/CodeGen/Analysis.cpp b/llvm/lib/CodeGen/Analysis.cpp
index 09e30eba579..110a294020a 100644
--- a/llvm/lib/CodeGen/Analysis.cpp
+++ b/llvm/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/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp b/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp
index 4d31444b764..665d5b01716 100644
--- a/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp
+++ b/llvm/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/llvm/lib/VMCore/Attributes.cpp b/llvm/lib/VMCore/Attributes.cpp
index 326afc7ba93..e70efc54fa7 100644
--- a/llvm/lib/VMCore/Attributes.cpp
+++ b/llvm/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;
OpenPOWER on IntegriCloud