<div dir="ltr">Now the function is so small that you probably want to inline it and remove it.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Sep 23, 2019 at 6:53 PM George Rimar via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Author: grimar<br>
Date: Mon Sep 23 02:55:10 2019<br>
New Revision: 372570<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=372570&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=372570&view=rev</a><br>
Log:<br>
[LLD][ELF] - Simplify getFlagsFromEmulation(). NFCI.<br>
<br>
A straightforward simplification.<br>
<br>
Modified:<br>
lld/trunk/ELF/Arch/MipsArchTree.cpp<br>
<br>
Modified: lld/trunk/ELF/Arch/MipsArchTree.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Arch/MipsArchTree.cpp?rev=372570&r1=372569&r2=372570&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Arch/MipsArchTree.cpp?rev=372570&r1=372569&r2=372570&view=diff</a><br>
==============================================================================<br>
--- lld/trunk/ELF/Arch/MipsArchTree.cpp (original)<br>
+++ lld/trunk/ELF/Arch/MipsArchTree.cpp Mon Sep 23 02:55:10 2019<br>
@@ -297,19 +297,9 @@ static uint32_t getArchFlags(ArrayRef<Fi<br>
// If we don't have any input files, we'll have to rely on the information we<br>
// can derive from emulation information, since this at least gets us ABI.<br>
static uint32_t getFlagsFromEmulation() {<br>
- uint32_t ret = 0;<br>
-<br>
- if (config->emulation.empty())<br>
+ if (config->emulation.empty() || config->is64)<br>
return 0;<br>
-<br>
- if (config->ekind == ELF32BEKind || config->ekind == ELF32LEKind) {<br>
- if (config->mipsN32Abi)<br>
- ret |= EF_MIPS_ABI2;<br>
- else<br>
- ret |= EF_MIPS_ABI_O32;<br>
- }<br>
-<br>
- return ret;<br>
+ return config->mipsN32Abi ? EF_MIPS_ABI2 : EF_MIPS_ABI_O32;<br>
}<br>
<br>
template <class ELFT> uint32_t elf::calcMipsEFlags() {<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div>