mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-15 07:33:18 +00:00
Support a common idiom on how to build an Attributes class with a single attribute.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165686 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
64ea275fe4
commit
3183951d88
@ -95,6 +95,7 @@ private:
|
||||
public:
|
||||
Attributes() : Attrs(0) {}
|
||||
explicit Attributes(uint64_t Val);
|
||||
explicit Attributes(AttrVal Val);
|
||||
Attributes(const Attributes &A);
|
||||
|
||||
class Builder {
|
||||
|
@ -29,6 +29,9 @@ using namespace llvm;
|
||||
|
||||
Attributes::Attributes(uint64_t Val) : Attrs(Val) {}
|
||||
|
||||
Attributes::Attributes(AttrVal Val)
|
||||
: Attrs(Attributes::get(Attributes::Builder().addAttribute(Val)).Attrs) {}
|
||||
|
||||
Attributes::Attributes(AttributesImpl *A) : Attrs(A->Bits) {}
|
||||
|
||||
Attributes::Attributes(const Attributes &A) : Attrs(A.Attrs) {}
|
||||
|
Loading…
x
Reference in New Issue
Block a user