<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Title" content="">
<meta name="Keywords" content="">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.msoIns
        {mso-style-type:export-only;
        mso-style-name:"";
        text-decoration:underline;
        color:teal;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style>
</head>
<body bgcolor="white" lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">I agree on that being slightly confusing. I think it's used commonly enough that developers would be familiar with the semantics though.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:12.0pt;color:black">From: </span></b><span style="font-size:12.0pt;color:black">Rui Ueyama <ruiu@google.com><br>
<b>Date: </b>Friday, December 15, 2017 at 4:12 PM<br>
<b>To: </b>Shoaib Meenai <smeenai@fb.com><br>
<b>Cc: </b>llvm-commits <llvm-commits@lists.llvm.org><br>
<b>Subject: </b>Re: [lld] r320892 - [COFF] Simplify hasArgs calls. NFC<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">This is not your fault, but I think I dislike multi-argument hasArg function. It should've been named hasAnyOf or something like that, so that it's obvious that that's not hasAllOf.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On Fri, Dec 15, 2017 at 3:51 PM, Shoaib Meenai via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>> wrote:<o:p></o:p></p>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<p class="MsoNormal">Author: smeenai<br>
Date: Fri Dec 15 15:51:14 2017<br>
New Revision: 320892<br>
<br>
URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject-3Frev-3D320892-26view-3Drev&d=DwMFaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=o3kDXzdBUE3ljQXKeTWOMw&m=AzVwzgmXhdIf4n9m_zQGkFvOvz1CgkmblNsyw-rMEs4&s=_DjCNpTMW1IeqXtyjlTtuA2XT0NKtDTKra5LIPrB1HA&e=" target="_blank">
http://llvm.org/viewvc/llvm-project?rev=320892&view=rev</a><br>
Log:<br>
[COFF] Simplify hasArgs calls. NFC<br>
<br>
We can just pass multiple options to hasArgs (which will check for any<br>
of those options being present) instead of calling it multiple times.<br>
<br>
Modified:<br>
    lld/trunk/COFF/Driver.cpp<br>
<br>
Modified: lld/trunk/COFF/Driver.cpp<br>
URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_lld_trunk_COFF_Driver.cpp-3Frev-3D320892-26r1-3D320891-26r2-3D320892-26view-3Ddiff&d=DwMFaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=o3kDXzdBUE3ljQXKeTWOMw&m=AzVwzgmXhdIf4n9m_zQGkFvOvz1CgkmblNsyw-rMEs4&s=6Mtn1v4xVpLBnLEj9V_6611JCShdOVfweeLVb_nCz34&e=" target="_blank">
http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/Driver.cpp?rev=320892&r1=320891&r2=320892&view=diff</a><br>
==============================================================================<br>
--- lld/trunk/COFF/Driver.cpp (original)<br>
+++ lld/trunk/COFF/Driver.cpp Fri Dec 15 15:51:14 2017<br>
@@ -805,12 +805,11 @@ void LinkerDriver::link(ArrayRef<const c<br>
   errorHandler().Verbose = Config->Verbose;<br>
<br>
   // Handle /force or /force:unresolved<br>
-  if (Args.hasArg(OPT_force) || Args.hasArg(OPT_force_unresolved))<br>
+  if (Args.hasArg(OPT_force, OPT_force_unresolved))<br>
     Config->Force = true;<br>
<br>
   // Handle /debug<br>
-  if (Args.hasArg(OPT_debug) || Args.hasArg(OPT_debug_dwarf) ||<br>
-      Args.hasArg(OPT_debug_ghash)) {<br>
+  if (Args.hasArg(OPT_debug, OPT_debug_dwarf, OPT_debug_ghash)) {<br>
     Config->Debug = true;<br>
     if (auto *Arg = Args.getLastArg(OPT_debugtype))<br>
       Config->DebugTypes = parseDebugType(Arg->getValue());<br>
@@ -1152,7 +1151,7 @@ void LinkerDriver::link(ArrayRef<const c<br>
   }<br>
<br>
   // Disable PDB generation if the user requested it.<br>
-  if (Args.hasArg(OPT_nopdb) || Args.hasArg(OPT_debug_dwarf))<br>
+  if (Args.hasArg(OPT_nopdb, OPT_debug_dwarf))<br>
     Config->PDBPath = "";<br>
<br>
   // Set default image base if /base is not given.<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>
<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.llvm.org_cgi-2Dbin_mailman_listinfo_llvm-2Dcommits&d=DwMFaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=o3kDXzdBUE3ljQXKeTWOMw&m=AzVwzgmXhdIf4n9m_zQGkFvOvz1CgkmblNsyw-rMEs4&s=6pJlwUhvceEitagkTdH9YAV-fdw15PdX5tad12MLo84&e=" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><o:p></o:p></p>
</blockquote>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</body>
</html>