[PATCH] D44819: [ARM] Simplify constructing the ARMArchFeature string. NFC.
Martin Storsjö via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 26 01:43:58 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL328478: [ARM] Simplify constructing the ARMArchFeature string. NFC. (authored by mstorsjo, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D44819?vs=139563&id=139767#toc
Repository:
rL LLVM
https://reviews.llvm.org/D44819
Files:
llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp
Index: llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp
===================================================================
--- llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp
+++ llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp
@@ -140,24 +140,21 @@
ARMArchFeature = (ARMArchFeature + "+" + ARM::getArchName(ArchID)).str();
if (TT.isThumb()) {
- if (ARMArchFeature.empty())
- ARMArchFeature = "+thumb-mode,+v4t";
- else
- ARMArchFeature += ",+thumb-mode,+v4t";
+ if (!ARMArchFeature.empty())
+ ARMArchFeature += ",";
+ ARMArchFeature += "+thumb-mode,+v4t";
}
if (TT.isOSNaCl()) {
- if (ARMArchFeature.empty())
- ARMArchFeature = "+nacl-trap";
- else
- ARMArchFeature += ",+nacl-trap";
+ if (!ARMArchFeature.empty())
+ ARMArchFeature += ",";
+ ARMArchFeature += "+nacl-trap";
}
if (TT.isOSWindows()) {
- if (ARMArchFeature.empty())
- ARMArchFeature = "+noarm";
- else
- ARMArchFeature += ",+noarm";
+ if (!ARMArchFeature.empty())
+ ARMArchFeature += ",";
+ ARMArchFeature += "+noarm";
}
return ARMArchFeature;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D44819.139767.patch
Type: text/x-patch
Size: 1156 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180326/bdbbadde/attachment.bin>
More information about the llvm-commits
mailing list