diff options
author | NAKAMURA Takumi <geek4civic@gmail.com> | 2013-01-03 01:42:06 +0000 |
---|---|---|
committer | NAKAMURA Takumi <geek4civic@gmail.com> | 2013-01-03 01:42:06 +0000 |
commit | cedab7ecf3533450a25a723d2856b927683f38de (patch) | |
tree | 145638eed6a7df015cc6896b28fde095ea6bd0d7 /llvm/lib/IR/Attributes.cpp | |
parent | 1d6aac5b6ade8beb1a614ae53eadafc53aed471e (diff) | |
download | bcm5719-llvm-cedab7ecf3533450a25a723d2856b927683f38de.tar.gz bcm5719-llvm-cedab7ecf3533450a25a723d2856b927683f38de.zip |
Revert r171427, "An intermediate step in the Attributes rewrite."
llvm-svn: 171441
Diffstat (limited to 'llvm/lib/IR/Attributes.cpp')
-rw-r--r-- | llvm/lib/IR/Attributes.cpp | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/llvm/lib/IR/Attributes.cpp b/llvm/lib/IR/Attributes.cpp index b847d768f3a..a7fba3ff47f 100644 --- a/llvm/lib/IR/Attributes.cpp +++ b/llvm/lib/IR/Attributes.cpp @@ -233,15 +233,8 @@ std::string Attribute::getAsString() const { // AttrBuilder Implementation //===----------------------------------------------------------------------===// -void AttrBuilder::clear() { - AttrSet.clear(); - Alignment = StackAlignment = Bits = 0; -} - AttrBuilder &AttrBuilder::addAttribute(Attribute::AttrKind Val){ Bits |= AttributeImpl::getAttrMask(Val); - - AttrSet.insert(Val); return *this; } @@ -255,31 +248,19 @@ AttrBuilder &AttrBuilder::addAlignmentAttr(unsigned Align) { assert(isPowerOf2_32(Align) && "Alignment must be a power of two."); assert(Align <= 0x40000000 && "Alignment too large."); Bits |= (Log2_32(Align) + 1) << 16; - - AttrSet.insert(Attribute::Alignment); - Alignment = Align; return *this; } -AttrBuilder &AttrBuilder::addStackAlignmentAttr(unsigned Align) { +AttrBuilder &AttrBuilder::addStackAlignmentAttr(unsigned Align){ // Default alignment, allow the target to define how to align it. if (Align == 0) return *this; assert(isPowerOf2_32(Align) && "Alignment must be a power of two."); assert(Align <= 0x100 && "Alignment too large."); Bits |= (Log2_32(Align) + 1) << 26; - - AttrSet.insert(Attribute::StackAlignment); - StackAlignment = Align; return *this; } AttrBuilder &AttrBuilder::removeAttribute(Attribute::AttrKind Val) { Bits &= ~AttributeImpl::getAttrMask(Val); - - AttrSet.erase(Val); - if (Val == Attribute::Alignment) - Alignment = 0; - else if (Val == Attribute::StackAlignment) - StackAlignment = 0; return *this; } |