aboutsummaryrefslogtreecommitdiffstats
path: root/lib/VMCore
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2012-10-11 01:05:52 +0000
committerBill Wendling <isanbard@gmail.com>2012-10-11 01:05:52 +0000
commit3183951d88680d6077dbb7a4b0daf84124434f45 (patch)
treefd2b338a25a6e6e8e35c1988c23c13518199c545 /lib/VMCore
parent64ea275fe4e85f112ccfaf9c7b56fe64e11c771f (diff)
downloadexternal_llvm-3183951d88680d6077dbb7a4b0daf84124434f45.zip
external_llvm-3183951d88680d6077dbb7a4b0daf84124434f45.tar.gz
external_llvm-3183951d88680d6077dbb7a4b0daf84124434f45.tar.bz2
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
Diffstat (limited to 'lib/VMCore')
-rw-r--r--lib/VMCore/Attributes.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/VMCore/Attributes.cpp b/lib/VMCore/Attributes.cpp
index 0625ef3..7ae8232 100644
--- a/lib/VMCore/Attributes.cpp
+++ b/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) {}