summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/TargetMachine.cpp
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-02-14 15:36:52 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-02-14 15:36:52 +0000
commit025c0ad74c73648ddb4456354cbc7690afd21166 (patch)
tree7bc7634bf75381c1facef45e3614ddd1e0196e3e /llvm/lib/Target/TargetMachine.cpp
parentb5054333eca797944a852efa9e39512bbed924ea (diff)
downloadbcm5719-llvm-025c0ad74c73648ddb4456354cbc7690afd21166.tar.gz
bcm5719-llvm-025c0ad74c73648ddb4456354cbc7690afd21166.zip
Target: Canonicalize access to function attributes, NFC
Canonicalize access to function attributes to use the simpler API. getAttributes().getAttribute(AttributeSet::FunctionIndex, Kind) => getFnAttribute(Kind) getAttributes().hasAttribute(AttributeSet::FunctionIndex, Kind) => hasFnAttribute(Kind) llvm-svn: 229261
Diffstat (limited to 'llvm/lib/Target/TargetMachine.cpp')
-rw-r--r--llvm/lib/Target/TargetMachine.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/Target/TargetMachine.cpp b/llvm/lib/Target/TargetMachine.cpp
index c054f5789f0..307e93c37d4 100644
--- a/llvm/lib/Target/TargetMachine.cpp
+++ b/llvm/lib/Target/TargetMachine.cpp
@@ -54,10 +54,8 @@ TargetMachine::~TargetMachine() {
void TargetMachine::resetTargetOptions(const Function &F) const {
#define RESET_OPTION(X, Y) \
do { \
- if (F.hasFnAttribute(Y)) \
- Options.X = (F.getAttributes() \
- .getAttribute(AttributeSet::FunctionIndex, Y) \
- .getValueAsString() == "true"); \
+ if (F.hasFnAttribute(Y)) \
+ Options.X = (F.getFnAttribute(Y).getValueAsString() == "true"); \
} while (0)
RESET_OPTION(NoFramePointerElim, "no-frame-pointer-elim");
OpenPOWER on IntegriCloud