Use the enum value of the attributes when removing them from the attributes builder.

llvm-svn: 165495
This commit is contained in:
Bill Wendling 2012-10-09 09:17:28 +00:00
parent 93f70b78fd
commit 1c1b324ccf
3 changed files with 1 additions and 113 deletions

View File

@ -212,35 +212,6 @@ public:
void addStackAlignmentAttr(unsigned Align);
void removeAttributes(const Attributes &A);
void removeAddressSafetyAttr();
void removeAlwaysInlineAttr();
void removeByValAttr();
void removeInlineHintAttr();
void removeInRegAttr();
void removeNakedAttr();
void removeNestAttr();
void removeNoAliasAttr();
void removeNoCaptureAttr();
void removeNoImplicitFloatAttr();
void removeNoInlineAttr();
void removeNonLazyBindAttr();
void removeNoRedZoneAttr();
void removeNoReturnAttr();
void removeNoUnwindAttr();
void removeOptimizeForSizeAttr();
void removeReadNoneAttr();
void removeReadOnlyAttr();
void removeReturnsTwiceAttr();
void removeSExtAttr();
void removeStackProtectAttr();
void removeStackProtectReqAttr();
void removeStructRetAttr();
void removeUWTableAttr();
void removeZExtAttr();
void removeAlignmentAttr();
void removeStackAlignmentAttr();
};
/// get - Return a uniquified Attributes object. This takes the uniquified

View File

@ -2757,7 +2757,7 @@ bool LLParser::ParseFunctionHeader(Function *&Fn, bool isDefine) {
// If the alignment was parsed as an attribute, move to the alignment field.
if (FuncAttrs.hasAlignmentAttr()) {
Alignment = FuncAttrs.getAlignment();
FuncAttrs.removeAlignmentAttr();
FuncAttrs.removeAttribute(Attributes::Alignment);
}
// Okay, if we got here, the function is syntactically valid. Convert types

View File

@ -236,89 +236,6 @@ void Attributes::Builder::removeAttributes(const Attributes &A) {
Bits &= ~A.Raw();
}
void Attributes::Builder::removeAddressSafetyAttr() {
Bits &= ~Attribute::AddressSafety_i;
}
void Attributes::Builder::removeAlwaysInlineAttr() {
Bits &= ~Attribute::AlwaysInline_i;
}
void Attributes::Builder::removeByValAttr() {
Bits &= ~Attribute::ByVal_i;
}
void Attributes::Builder::removeInlineHintAttr() {
Bits &= ~Attribute::InlineHint_i;
}
void Attributes::Builder::removeInRegAttr() {
Bits &= ~Attribute::InReg_i;
}
void Attributes::Builder::removeNakedAttr() {
Bits &= ~Attribute::Naked_i;
}
void Attributes::Builder::removeNestAttr() {
Bits &= ~Attribute::Nest_i;
}
void Attributes::Builder::removeNoAliasAttr() {
Bits &= ~Attribute::NoAlias_i;
}
void Attributes::Builder::removeNoCaptureAttr() {
Bits &= ~Attribute::NoCapture_i;
}
void Attributes::Builder::removeNoImplicitFloatAttr() {
Bits &= ~Attribute::NoImplicitFloat_i;
}
void Attributes::Builder::removeNoInlineAttr() {
Bits &= ~Attribute::NoInline_i;
}
void Attributes::Builder::removeNonLazyBindAttr() {
Bits &= ~Attribute::NonLazyBind_i;
}
void Attributes::Builder::removeNoRedZoneAttr() {
Bits &= ~Attribute::NoRedZone_i;
}
void Attributes::Builder::removeNoReturnAttr() {
Bits &= ~Attribute::NoReturn_i;
}
void Attributes::Builder::removeNoUnwindAttr() {
Bits &= ~Attribute::NoUnwind_i;
}
void Attributes::Builder::removeOptimizeForSizeAttr() {
Bits &= ~Attribute::OptimizeForSize_i;
}
void Attributes::Builder::removeReadNoneAttr() {
Bits &= ~Attribute::ReadNone_i;
}
void Attributes::Builder::removeReadOnlyAttr() {
Bits &= ~Attribute::ReadOnly_i;
}
void Attributes::Builder::removeReturnsTwiceAttr() {
Bits &= ~Attribute::ReturnsTwice_i;
}
void Attributes::Builder::removeSExtAttr() {
Bits &= ~Attribute::SExt_i;
}
void Attributes::Builder::removeStackProtectAttr() {
Bits &= ~Attribute::StackProtect_i;
}
void Attributes::Builder::removeStackProtectReqAttr() {
Bits &= ~Attribute::StackProtectReq_i;
}
void Attributes::Builder::removeStructRetAttr() {
Bits &= ~Attribute::StructRet_i;
}
void Attributes::Builder::removeUWTableAttr() {
Bits &= ~Attribute::UWTable_i;
}
void Attributes::Builder::removeZExtAttr() {
Bits &= ~Attribute::ZExt_i;
}
void Attributes::Builder::removeAlignmentAttr() {
Bits &= ~Attribute::Alignment_i;
}
void Attributes::Builder::removeStackAlignmentAttr() {
Bits &= ~Attribute::StackAlignment_i;
}
bool Attributes::Builder::hasAttributes() const {
return Bits != 0;
}