]> granicus.if.org Git - clang/commitdiff
[IR] Refactor attribute methods in Function class (NFC)
authorEvandro Menezes <e.menezes@samsung.com>
Thu, 4 Apr 2019 22:40:06 +0000 (22:40 +0000)
committerEvandro Menezes <e.menezes@samsung.com>
Thu, 4 Apr 2019 22:40:06 +0000 (22:40 +0000)
Rename the functions that query the optimization kind attributes.

Differential revision: https://reviews.llvm.org/D60287

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@357731 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGCall.cpp

index 7dd312828d9862c5b7d243359db5741075874f9c..aa52e1e7c5164ca3ee481a9821ecec558097bbe3 100644 (file)
@@ -1809,7 +1809,7 @@ void CodeGenModule::ConstructDefaultFnAttrList(StringRef Name, bool HasOptnone,
 
 void CodeGenModule::AddDefaultFnAttrs(llvm::Function &F) {
   llvm::AttrBuilder FuncAttrs;
-  ConstructDefaultFnAttrList(F.getName(), F.optForNone(),
+  ConstructDefaultFnAttrList(F.getName(), F.hasOptNone(),
                              /* AttrOnCallsite = */ false, FuncAttrs);
   F.addAttributes(llvm::AttributeList::FunctionIndex, FuncAttrs);
 }