[PATCH] D44819: [ARM] Simplify constructing the ARMArchFeature string. NFC.
Martin Storsjö via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 23 02:17:06 PDT 2018
mstorsjo created this revision.
mstorsjo added a reviewer: peter.smith.
Herald added subscribers: kristof.beyls, javed.absar, dschuff.
Repository:
rL LLVM
https://reviews.llvm.org/D44819
Files:
lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp
Index: lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp
===================================================================
--- lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp
+++ 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.139563.patch
Type: text/x-patch
Size: 1123 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180323/22a5b4a1/attachment.bin>
More information about the llvm-commits
mailing list