Skip to content
This repository was archived by the owner on Nov 1, 2021. It is now read-only.

Commit e5cec77

Browse files
committed
Cherrypick upstream r233321
We upstreamed our Triple localmod for ARM in r233321. Remove the LOCALMODs and update to the upstream version. R=jvoung@chromium.org BUG=None Review URL: https://codereview.chromium.org/1048993002
1 parent ffdd8da commit e5cec77

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

lib/Support/Triple.cpp

+2-7
Original file line numberDiff line numberDiff line change
@@ -1011,13 +1011,6 @@ const char *Triple::getARMCPUForArch(StringRef MArch) const {
10111011
case llvm::Triple::Win32:
10121012
// FIXME: this is invalid for WindowsCE
10131013
return "cortex-a9";
1014-
// @LOCALMOD-START
1015-
case llvm::Triple::NaCl:
1016-
// Default to armv7 unless something more specific is specified.
1017-
if (MArch == "arm")
1018-
return "cortex-a9";
1019-
break;
1020-
// @LOCALMOD-END
10211014
default:
10221015
break;
10231016
}
@@ -1076,6 +1069,8 @@ const char *Triple::getARMCPUForArch(StringRef MArch) const {
10761069
default:
10771070
return "strongarm";
10781071
}
1072+
case llvm::Triple::NaCl:
1073+
return "cortex-a8";
10791074
default:
10801075
switch (getEnvironment()) {
10811076
case llvm::Triple::EABIHF:

unittests/ADT/TripleTest.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -663,5 +663,9 @@ TEST(TripleTest, getARMCPUForArch) {
663663
EXPECT_STREQ("cortex-a8", Triple.getARMCPUForArch());
664664
EXPECT_STREQ("swift", Triple.getARMCPUForArch("armv7s"));
665665
}
666+
{
667+
llvm::Triple Triple("arm--nacl");
668+
EXPECT_STREQ("cortex-a8", Triple.getARMCPUForArch("arm"));
669+
}
666670
}
667671
}

0 commit comments

Comments
 (0)