From: Heejin Ahn Date: Sat, 13 Apr 2019 16:54:39 +0000 (+0000) Subject: [WebAssembly] Use Function::hasOptSize() (NFC) X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1e9de49599981ff39c7168fe6eb98586af7fdabc;p=llvm [WebAssembly] Use Function::hasOptSize() (NFC) Summary: Use member function. Reviewers: aheejin Subscribers: sunfish, hiraditya, sbc100, jgravelle-google, dschuff, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60651 Patch by Hideto Ueno (uenoku) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358336 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/WebAssembly/WebAssemblyISelDAGToDAG.cpp b/lib/Target/WebAssembly/WebAssemblyISelDAGToDAG.cpp index 40ec91555e6..852e2e72f97 100644 --- a/lib/Target/WebAssembly/WebAssemblyISelDAGToDAG.cpp +++ b/lib/Target/WebAssembly/WebAssemblyISelDAGToDAG.cpp @@ -51,8 +51,7 @@ public: "********** Function: " << MF.getName() << '\n'); - ForCodeSize = MF.getFunction().hasFnAttribute(Attribute::OptimizeForSize) || - MF.getFunction().hasFnAttribute(Attribute::MinSize); + ForCodeSize = MF.getFunction().hasOptSize(); Subtarget = &MF.getSubtarget(); return SelectionDAGISel::runOnMachineFunction(MF); }