diff options
| author | Bill Wendling <isanbard@gmail.com> | 2012-10-11 01:05:52 +0000 |
|---|---|---|
| committer | Bill Wendling <isanbard@gmail.com> | 2012-10-11 01:05:52 +0000 |
| commit | 13410278b6263806b6eb2a836699700d284f4fca (patch) | |
| tree | f5917182c33f57a5a9022b6349b1d7db275e9870 /llvm/lib/VMCore/Attributes.cpp | |
| parent | a45358c28410e70902c22d893f5c5bed063f8831 (diff) | |
| download | bcm5719-llvm-13410278b6263806b6eb2a836699700d284f4fca.tar.gz bcm5719-llvm-13410278b6263806b6eb2a836699700d284f4fca.zip | |
Support a common idiom on how to build an Attributes class with a single attribute.
llvm-svn: 165686
Diffstat (limited to 'llvm/lib/VMCore/Attributes.cpp')
| -rw-r--r-- | llvm/lib/VMCore/Attributes.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/VMCore/Attributes.cpp b/llvm/lib/VMCore/Attributes.cpp index 0625ef3f09c..7ae823214bb 100644 --- a/llvm/lib/VMCore/Attributes.cpp +++ b/llvm/lib/VMCore/Attributes.cpp @@ -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) {} |

