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 | 440e9d81bf02746146c3fc817d87c3b8ef1416b2 (patch) | |
tree | 25d36dd55f9f254d5419d1511fb2adb6f7e616c1 /llvm/lib/IR/Attributes.cpp | |
parent | a9cc8c0385736c1e97dd672516bcf26f61cf8d97 (diff) | |
download | llvm-440e9d81bf02746146c3fc817d87c3b8ef1416b2.zip llvm-440e9d81bf02746146c3fc817d87c3b8ef1416b2.tar.gz llvm-440e9d81bf02746146c3fc817d87c3b8ef1416b2.tar.bz2 |
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.
llvm-svn: 187093
Diffstat (limited to 'llvm/lib/IR/Attributes.cpp')
-rw-r--r-- | llvm/lib/IR/Attributes.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/IR/Attributes.cpp b/llvm/lib/IR/Attributes.cpp index c8e2f6b..48743fa 100644 --- a/llvm/lib/IR/Attributes.cpp +++ b/llvm/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(); |