[PATCH] D34682: [Triple] Add isThumb and isARM functions NFCI.
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 27 04:08:59 PDT 2017
fhahn added inline comments.
================
Comment at: include/llvm/ADT/Triple.h:646
+ }
+
/// Tests wether the target supports comdat
----------------
javed.absar wrote:
> Would it be going too far to have isARMOrThumb defined as well while we are at it.
> I see use cases of it.
I am not sure if that's worth it. Using `TT.isARM() || TT.isThumb()` is just as readable IMO.
================
Comment at: lib/Target/ARM/ARMAsmPrinter.cpp:480
+ bool isThumb = TT.isThumb() ||
TT.getSubArch() == Triple::ARMSubArch_v7m ||
TT.getSubArch() == Triple::ARMSubArch_v6m;
----------------
I am slightly worried about those checks here. Should isThumb() return true for all M profile CPUs as they only support thumb-mode? Also, it seems that v8m is missing from this check.
https://reviews.llvm.org/D34682
More information about the llvm-commits
mailing list