summaryrefslogtreecommitdiff
path: root/lib/IR/Attributes.cpp
diff options
context:
space:
mode:
authorMichael Gottesman <mgottesman@apple.com>2013-06-27 00:25:01 +0000
committerMichael Gottesman <mgottesman@apple.com>2013-06-27 00:25:01 +0000
commit2253a2f52f3c46ae75cd05f5885acb987bd1d6b6 (patch)
tree483f06fa8a9b2981c441c49dde73b45eb724c03d /lib/IR/Attributes.cpp
parent9367c79e62307421f28ba92174f3792a6360f37b (diff)
downloadllvm-2253a2f52f3c46ae75cd05f5885acb987bd1d6b6.tar.gz
llvm-2253a2f52f3c46ae75cd05f5885acb987bd1d6b6.tar.bz2
llvm-2253a2f52f3c46ae75cd05f5885acb987bd1d6b6.tar.xz
Added support for the Builtin attribute.
The Builtin attribute is an attribute that can be placed on function call site that signal that even though a function is declared as being a builtin, rdar://problem/13727199 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185049 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/IR/Attributes.cpp')
-rw-r--r--lib/IR/Attributes.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/IR/Attributes.cpp b/lib/IR/Attributes.cpp
index e48ebb1335..2160ea2464 100644
--- a/lib/IR/Attributes.cpp
+++ b/lib/IR/Attributes.cpp
@@ -157,6 +157,8 @@ std::string Attribute::getAsString(bool InAttrGrp) const {
return "sanitize_address";
if (hasAttribute(Attribute::AlwaysInline))
return "alwaysinline";
+ if (hasAttribute(Attribute::Builtin))
+ return "builtin";
if (hasAttribute(Attribute::ByVal))
return "byval";
if (hasAttribute(Attribute::InlineHint))
@@ -399,6 +401,7 @@ uint64_t AttributeImpl::getAttrMask(Attribute::AttrKind Val) {
case Attribute::NoBuiltin: return 1ULL << 38;
case Attribute::Returned: return 1ULL << 39;
case Attribute::Cold: return 1ULL << 40;
+ case Attribute::Builtin: return 1ULL << 41;
}
llvm_unreachable("Unsupported attribute type");
}