[PATCH] Simplify getARMCPUForMArch() and make it more consistent
Jon Roelofs
jonathan at codesourcery.com
Fri Apr 18 09:18:49 PDT 2014
================
Comment at: lib/Driver/Tools.cpp:4887
@@ +4886,3 @@
+ if (MArch.startswith("arm") || MArch.startswith("thumb"))
+ result = llvm::StringSwitch<const char *>(MArch)
+ .EndsWith("v2", "arm2")
----------------
On second thought, this would allow things like "armblahblahblahv4" to be matched as "strongarm".
Maybe it is better to substr MArch to take off the arm/thumb part, then check for eb, chomp that off as well, and finally check that whats left is one of those suffixes.
http://reviews.llvm.org/D3409
More information about the cfe-commits
mailing list