r357638 - [IR] Create new method in `Function` class (NFC)
Evandro Menezes via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 3 14:27:03 PDT 2019
Author: evandro
Date: Wed Apr 3 14:27:03 2019
New Revision: 357638
URL: http://llvm.org/viewvc/llvm-project?rev=357638&view=rev
Log:
[IR] Create new method in `Function` class (NFC)
Create method `optForNone()` testing for the function level equivalent of
`-O0` and refactor appropriately.
Differential revision: https://reviews.llvm.org/D59852
Modified:
cfe/trunk/lib/CodeGen/CGCall.cpp
Modified: cfe/trunk/lib/CodeGen/CGCall.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGCall.cpp?rev=357638&r1=357637&r2=357638&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGCall.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGCall.cpp Wed Apr 3 14:27:03 2019
@@ -1809,8 +1809,7 @@ void CodeGenModule::ConstructDefaultFnAt
void CodeGenModule::AddDefaultFnAttrs(llvm::Function &F) {
llvm::AttrBuilder FuncAttrs;
- ConstructDefaultFnAttrList(F.getName(),
- F.hasFnAttribute(llvm::Attribute::OptimizeNone),
+ ConstructDefaultFnAttrList(F.getName(), F.optForNone(),
/* AttrOnCallsite = */ false, FuncAttrs);
F.addAttributes(llvm::AttributeList::FunctionIndex, FuncAttrs);
}
More information about the cfe-commits
mailing list