diff options
author | Bill Wendling <isanbard@gmail.com> | 2013-02-22 00:12:35 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2013-02-22 00:12:35 +0000 |
commit | 143d46476cdcf5b88b9ee18ebd799e5820a2db0e (patch) | |
tree | 8b99f1da4df8777771cf9355beeefc3660950465 /include/llvm/IR/Attributes.h | |
parent | a931a12e04b856421977c86d94789cd8b47d6ad3 (diff) | |
download | llvm-143d46476cdcf5b88b9ee18ebd799e5820a2db0e.tar.gz llvm-143d46476cdcf5b88b9ee18ebd799e5820a2db0e.tar.bz2 llvm-143d46476cdcf5b88b9ee18ebd799e5820a2db0e.tar.xz |
Implement the NoBuiltin attribute.
The 'nobuiltin' attribute is applied to call sites to indicate that LLVM should
not treat the callee function as a built-in function. I.e., it shouldn't try to
replace that function with different code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175835 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/IR/Attributes.h')
-rw-r--r-- | include/llvm/IR/Attributes.h | 27 |
1 files changed, 2 insertions, 25 deletions
diff --git a/include/llvm/IR/Attributes.h b/include/llvm/IR/Attributes.h index 380bc6a3e0..f207ad6f75 100644 --- a/include/llvm/IR/Attributes.h +++ b/include/llvm/IR/Attributes.h @@ -75,6 +75,7 @@ public: Naked, ///< Naked function Nest, ///< Nested function static chain NoAlias, ///< Considered to not alias after call + NoBuiltin, ///< Callee isn't recognized as a builtin NoCapture, ///< Function creates no aliases of pointer NoDuplicate, ///< Call cannot be duplicated NoImplicitFloat, ///< Disable implicit floating point insts @@ -473,31 +474,7 @@ public: bool td_empty() const { return TargetDepAttrs.empty(); } /// \brief Remove attributes that are used on functions only. - void removeFunctionOnlyAttrs() { - removeAttribute(Attribute::NoReturn) - .removeAttribute(Attribute::NoUnwind) - .removeAttribute(Attribute::ReadNone) - .removeAttribute(Attribute::ReadOnly) - .removeAttribute(Attribute::NoInline) - .removeAttribute(Attribute::AlwaysInline) - .removeAttribute(Attribute::OptimizeForSize) - .removeAttribute(Attribute::StackProtect) - .removeAttribute(Attribute::StackProtectReq) - .removeAttribute(Attribute::StackProtectStrong) - .removeAttribute(Attribute::NoRedZone) - .removeAttribute(Attribute::NoImplicitFloat) - .removeAttribute(Attribute::Naked) - .removeAttribute(Attribute::InlineHint) - .removeAttribute(Attribute::StackAlignment) - .removeAttribute(Attribute::UWTable) - .removeAttribute(Attribute::NonLazyBind) - .removeAttribute(Attribute::ReturnsTwice) - .removeAttribute(Attribute::AddressSafety) - .removeAttribute(Attribute::ThreadSafety) - .removeAttribute(Attribute::UninitializedChecks) - .removeAttribute(Attribute::MinSize) - .removeAttribute(Attribute::NoDuplicate); - } + void removeFunctionOnlyAttrs(); bool operator==(const AttrBuilder &B); bool operator!=(const AttrBuilder &B) { |