From: Eric Christopher Date: Tue, 1 Sep 2015 22:03:56 +0000 (+0000) Subject: Use hasAttr, not getAttr if we're just checking for presence. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2cdc7ef842d04844d076f9a72476f7840354d01b;p=clang Use hasAttr, not getAttr if we're just checking for presence. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@246595 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp index 74a47bfc2b..270d9941ec 100644 --- a/lib/CodeGen/CGCall.cpp +++ b/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();