From b57804a134dfecfd9117c61ec07ce937791cb8ce Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Tue, 1 Sep 2015 22:03:56 +0000 Subject: Use hasAttr, not getAttr if we're just checking for presence. llvm-svn: 246595 --- clang/lib/CodeGen/CGCall.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/lib/CodeGen/CGCall.cpp') 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(TargetDecl); - if (FD && FD->getAttr()) { + if (FD && FD->hasAttr()) { llvm::StringMap FeatureMap; const auto *TD = FD->getAttr(); -- cgit v1.2.3