aboutsummaryrefslogtreecommitdiffstats
path: root/lib/VMCore/Attributes.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2012-12-20 21:28:43 +0000
committerBill Wendling <isanbard@gmail.com>2012-12-20 21:28:43 +0000
commit27107f6ab4627fa38bcacad6757ed6d52910f880 (patch)
tree05d48ae0d493e949b92f63305b170a7255fc48d3 /lib/VMCore/Attributes.cpp
parent54c1902919b502d7b549f9e967e8d9b6921fabf9 (diff)
downloadexternal_llvm-27107f6ab4627fa38bcacad6757ed6d52910f880.tar.gz
external_llvm-27107f6ab4627fa38bcacad6757ed6d52910f880.tar.bz2
external_llvm-27107f6ab4627fa38bcacad6757ed6d52910f880.zip
Some random comment, naming, and format changes.
Rename the AttributeImpl* from Attrs to pImpl to be consistent with other code. Add comments where none were before. Or doxygen-ify other comments. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170767 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Attributes.cpp')
-rw-r--r--lib/VMCore/Attributes.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/lib/VMCore/Attributes.cpp b/lib/VMCore/Attributes.cpp
index 5bde5638a1..d47f35aed3 100644
--- a/lib/VMCore/Attributes.cpp
+++ b/lib/VMCore/Attributes.cpp
@@ -62,22 +62,22 @@ Attribute Attribute::get(LLVMContext &Context, AttrBuilder &B) {
}
bool Attribute::hasAttribute(AttrVal Val) const {
- return Attrs && Attrs->hasAttribute(Val);
+ return pImpl && pImpl->hasAttribute(Val);
}
bool Attribute::hasAttributes() const {
- return Attrs && Attrs->hasAttributes();
+ return pImpl && pImpl->hasAttributes();
}
bool Attribute::hasAttributes(const Attribute &A) const {
- return Attrs && Attrs->hasAttributes(A);
+ return pImpl && pImpl->hasAttributes(A);
}
/// This returns the alignment field of an attribute as a byte alignment value.
unsigned Attribute::getAlignment() const {
if (!hasAttribute(Attribute::Alignment))
return 0;
- return 1U << ((Attrs->getAlignment() >> 16) - 1);
+ return 1U << ((pImpl->getAlignment() >> 16) - 1);
}
/// This returns the stack alignment field of an attribute as a byte alignment
@@ -85,11 +85,11 @@ unsigned Attribute::getAlignment() const {
unsigned Attribute::getStackAlignment() const {
if (!hasAttribute(Attribute::StackAlignment))
return 0;
- return 1U << ((Attrs->getStackAlignment() >> 26) - 1);
+ return 1U << ((pImpl->getStackAlignment() >> 26) - 1);
}
uint64_t Attribute::Raw() const {
- return Attrs ? Attrs->Raw() : 0;
+ return pImpl ? pImpl->Raw() : 0;
}
Attribute Attribute::typeIncompatible(Type *Ty) {
@@ -398,8 +398,6 @@ AttributeSet AttributeSet::get(LLVMContext &C,
//===----------------------------------------------------------------------===//
const AttributeSet &AttributeSet::operator=(const AttributeSet &RHS) {
- if (AttrList == RHS.AttrList) return *this;
-
AttrList = RHS.AttrList;
return *this;
}