Convert the LLVM parser over to using the new Attributes::Builder to build its

attributes objects.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165436 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Bill Wendling
2012-10-08 22:20:14 +00:00
parent c92b8aa79f
commit 0327244ec6
3 changed files with 39 additions and 32 deletions

View File

@@ -33,6 +33,12 @@ Attributes::Attributes(Attribute::AttrConst Val) : Attrs(Val.v) {}
Attributes::Attributes(AttributesImpl *A) : Attrs(A->Bits) {}
// FIXME: This is temporary until we have implemented the uniquified version of
// AttributesImpl.
Attributes Attributes::get(Attributes::Builder &B) {
return Attributes(B.Bits);
}
Attributes Attributes::get(LLVMContext &Context, Attributes::Builder &B) {
// If there are no attributes, return an empty Attributes class.
if (B.Bits == 0)