Default to armv7 cpu for NaCl when march=arm
authorDerek Schuff <dschuff@google.com>
Thu, 26 Mar 2015 21:58:46 +0000 (21:58 +0000)
committerDerek Schuff <dschuff@google.com>
Thu, 26 Mar 2015 21:58:46 +0000 (21:58 +0000)
commit337bd191d23e54c34b7d3942828409d6cb2c10b7
tree1c3c3e048f536f2ed6f8ec03069dd0d2de9687b8
parent9d2f0da138d9b2ea42b61b3545032f1403e4273e
Default to armv7 cpu for NaCl when march=arm

Summary:
When the arch is given as "arm" clang uses the default target CPU from
LLVM to determine what the real arch should be (i.e. "arm" becomes
"armv4t" because LLVM's getARMCPUForArch falls back to "arm7tdmi").
Default to "cortex-a8" so that we end up with "armv7" in clang.

the nacl-direct.c test in clang also covers this case.

Differential Revision: http://reviews.llvm.org/D8589

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233321 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Support/Triple.cpp
unittests/ADT/TripleTest.cpp