summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGCall.cpp
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2015-09-01 22:03:56 +0000
committerEric Christopher <echristo@gmail.com>2015-09-01 22:03:56 +0000
commitb57804a134dfecfd9117c61ec07ce937791cb8ce (patch)
tree6052818192acf753a2923cd6ea3ad7e1186319dd /clang/lib/CodeGen/CGCall.cpp
parent699a9dd7c3d217f16c7dd0e6ea53738f7754ba6a (diff)
downloadbcm5719-llvm-b57804a134dfecfd9117c61ec07ce937791cb8ce.tar.gz
bcm5719-llvm-b57804a134dfecfd9117c61ec07ce937791cb8ce.zip
Use hasAttr, not getAttr if we're just checking for presence.
llvm-svn: 246595
Diffstat (limited to 'clang/lib/CodeGen/CGCall.cpp')
-rw-r--r--clang/lib/CodeGen/CGCall.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp
index 74a47bfc2b6..270d9941ec8 100644
--- a/clang/lib/CodeGen/CGCall.cpp
+++ b/clang/lib/CodeGen/CGCall.cpp
@@ -1497,7 +1497,7 @@ void CodeGenModule::ConstructAttributeList(const CGFunctionInfo &FI,
// parse that and add it to the feature set.
StringRef TargetCPU = getTarget().getTargetOpts().CPU;
const FunctionDecl *FD = dyn_cast_or_null<FunctionDecl>(TargetDecl);
- if (FD && FD->getAttr<TargetAttr>()) {
+ if (FD && FD->hasAttr<TargetAttr>()) {
llvm::StringMap<bool> FeatureMap;
const auto *TD = FD->getAttr<TargetAttr>();
OpenPOWER on IntegriCloud