[llvm] r236492 - Fix regression in parsing armv{6, 7}hl- triples. These are used by SUSE
Ismail Donmez
ismail at donmez.ws
Tue May 5 02:29:44 PDT 2015
Author: ismail
Date: Tue May 5 04:29:43 2015
New Revision: 236492
URL: http://llvm.org/viewvc/llvm-project?rev=236492&view=rev
Log:
Fix regression in parsing armv{6,7}hl- triples. These are used by SUSE
and Redhat currently.
Reviewed by Jonathan Roelofs.
Modified:
llvm/trunk/lib/Support/Triple.cpp
llvm/trunk/unittests/ADT/TripleTest.cpp
Modified: llvm/trunk/lib/Support/Triple.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Triple.cpp?rev=236492&r1=236491&r2=236492&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Triple.cpp (original)
+++ llvm/trunk/lib/Support/Triple.cpp Tue May 5 04:29:43 2015
@@ -279,9 +279,10 @@ static Triple::ArchType parseARMArch(Str
.Cases("v3", "v3m", isThumb ? Triple::UnknownArch : arch)
.Cases("v4", "v4t", arch)
.Cases("v5", "v5e", "v5t", "v5te", "v5tej", arch)
- .Cases("v6", "v6j", "v6k", "v6m", "v6sm", arch)
+ .Cases("v6", "v6hl", "v6j", "v6k", arch)
+ .Cases("v6m", "v6sm", arch)
.Cases("v6t2", "v6z", "v6zk", arch)
- .Cases("v7", "v7a", "v7em", "v7l", arch)
+ .Cases("v7", "v7a", "v7em", "v7hl", "v7l", arch)
.Cases("v7m", "v7r", "v7s", arch)
.Cases("v8", "v8a", arch)
.Cases("v8.1", "v8.1a", arch)
Modified: llvm/trunk/unittests/ADT/TripleTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ADT/TripleTest.cpp?rev=236492&r1=236491&r2=236492&view=diff
==============================================================================
--- llvm/trunk/unittests/ADT/TripleTest.cpp (original)
+++ llvm/trunk/unittests/ADT/TripleTest.cpp Tue May 5 04:29:43 2015
@@ -129,6 +129,18 @@ TEST(TripleTest, ParsedIDs) {
EXPECT_EQ(Triple::UnknownOS, T.getOS());
EXPECT_EQ(Triple::EABI, T.getEnvironment());
+ T = Triple("armv6hl-none-linux-gnueabi");
+ EXPECT_EQ(Triple::arm, T.getArch());
+ EXPECT_EQ(Triple::Linux, T.getOS());
+ EXPECT_EQ(Triple::UnknownVendor, T.getVendor());
+ EXPECT_EQ(Triple::GNUEABI, T.getEnvironment());
+
+ T = Triple("armv7hl-none-linux-gnueabi");
+ EXPECT_EQ(Triple::arm, T.getArch());
+ EXPECT_EQ(Triple::Linux, T.getOS());
+ EXPECT_EQ(Triple::UnknownVendor, T.getVendor());
+ EXPECT_EQ(Triple::GNUEABI, T.getEnvironment());
+
T = Triple("amdil-unknown-unknown");
EXPECT_EQ(Triple::amdil, T.getArch());
EXPECT_EQ(Triple::UnknownVendor, T.getVendor());
More information about the llvm-commits
mailing list