diff options
author | Bill Wendling <isanbard@gmail.com> | 2013-07-25 00:34:29 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2013-07-25 00:34:29 +0000 |
commit | f245ae5a4a78d5a02b3b9e2dae819077a56d81e7 (patch) | |
tree | 517ee29a63e853faa1a41509e465915e597ad8fc /lib/IR | |
parent | 9b344d920f6b3496885094bd2f364453cb8d968f (diff) | |
download | llvm-f245ae5a4a78d5a02b3b9e2dae819077a56d81e7.tar.gz llvm-f245ae5a4a78d5a02b3b9e2dae819077a56d81e7.tar.bz2 llvm-f245ae5a4a78d5a02b3b9e2dae819077a56d81e7.tar.xz |
Replace the "NoFramePointerElimNonLeaf" target option with a function attribute.
There's no need to specify a flag to omit frame pointer elimination on non-leaf
nodes...(Honestly, I can't parse that option out.) Use the function attribute
stuff instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187093 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/IR')
-rw-r--r-- | lib/IR/Attributes.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/IR/Attributes.cpp b/lib/IR/Attributes.cpp index c8e2f6be5c..48743fae69 100644 --- a/lib/IR/Attributes.cpp +++ b/lib/IR/Attributes.cpp @@ -104,24 +104,28 @@ bool Attribute::isStringAttribute() const { } Attribute::AttrKind Attribute::getKindAsEnum() const { + if (!pImpl) return None; assert((isEnumAttribute() || isAlignAttribute()) && "Invalid attribute type to get the kind as an enum!"); return pImpl ? pImpl->getKindAsEnum() : None; } uint64_t Attribute::getValueAsInt() const { + if (!pImpl) return 0; assert(isAlignAttribute() && "Expected the attribute to be an alignment attribute!"); return pImpl ? pImpl->getValueAsInt() : 0; } StringRef Attribute::getKindAsString() const { + if (!pImpl) return StringRef(); assert(isStringAttribute() && "Invalid attribute type to get the kind as a string!"); return pImpl ? pImpl->getKindAsString() : StringRef(); } StringRef Attribute::getValueAsString() const { + if (!pImpl) return StringRef(); assert(isStringAttribute() && "Invalid attribute type to get the value as a string!"); return pImpl ? pImpl->getValueAsString() : StringRef(); |