summaryrefslogtreecommitdiff
path: root/lib/IR/Attributes.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2013-04-18 20:15:25 +0000
committerBill Wendling <isanbard@gmail.com>2013-04-18 20:15:25 +0000
commitbb1b63c48397a3bac5d00f2ac9d33cc14efd714c (patch)
treefd01da2199225cea17f87952fc4a790e8d897f41 /lib/IR/Attributes.cpp
parent4b15d6ae49b407cfcf526a3f7bec7ab15fa803c0 (diff)
downloadllvm-bb1b63c48397a3bac5d00f2ac9d33cc14efd714c.tar.gz
llvm-bb1b63c48397a3bac5d00f2ac9d33cc14efd714c.tar.bz2
llvm-bb1b63c48397a3bac5d00f2ac9d33cc14efd714c.tar.xz
This patch addresses two cleanup issues:
1. Verify::VerifyParameterAttrs in "lib/IR/Verifier.cpp" and AttrBuilder::removeFunctionOnlyAttrs in "lib/IR/Attributes.cpp" (only called by Verify::VerifyFunctionAttrs) separately maintained a list of function-only attribute types. I've consolidated the logic into a new function used for both cases in "lib/IR/Verifier.cpp", so this logic is in one place (other than the AsmParser front-end) 2. Various functions in "lib/IR/Verifier.cpp" passed AttributeSet around by reference needlessly, as it's just a handle to an immutable pimpl body. Patch by Stephen Lin! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179790 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/IR/Attributes.cpp')
-rw-r--r--lib/IR/Attributes.cpp27
1 files changed, 0 insertions, 27 deletions
diff --git a/lib/IR/Attributes.cpp b/lib/IR/Attributes.cpp
index b513f7dc84..f434b8e8c3 100644
--- a/lib/IR/Attributes.cpp
+++ b/lib/IR/Attributes.cpp
@@ -1115,33 +1115,6 @@ bool AttrBuilder::operator==(const AttrBuilder &B) {
return Alignment == B.Alignment && StackAlignment == B.StackAlignment;
}
-void AttrBuilder::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::SanitizeAddress)
- .removeAttribute(Attribute::SanitizeThread)
- .removeAttribute(Attribute::SanitizeMemory)
- .removeAttribute(Attribute::MinSize)
- .removeAttribute(Attribute::NoDuplicate)
- .removeAttribute(Attribute::NoBuiltin);
-}
-
AttrBuilder &AttrBuilder::addRawValue(uint64_t Val) {
// FIXME: Remove this in 4.0.
if (!Val) return *this;