[PATCH] D119917: [Support] Add CSKY target parser and attributes parser

Zixuan Wu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 24 23:44:27 PST 2022


zixuan-wu added inline comments.


================
Comment at: llvm/unittests/Support/CSKYAttributeParserTest.cpp:110-111
+  EXPECT_TRUE(testTagString(4, "Tag_CSKY_ARCH_NAME"));
+  EXPECT_TRUE(
+      testAttributeString(4, "ck860", CSKYAttrs::CSKY_ARCH_NAME, "ck860"));
+}
----------------
DavidSpickett wrote:
> As this attribute is a string, so it doesn't make sense to exhaustively check every arch name here since all this is doing is pulling a string not checking what it's value is.
> 
> Correct? (same for cpu test below)
So, how to generate a random string?


================
Comment at: llvm/unittests/Support/CSKYTargetParserTest.cpp:1045
+
+TEST(TargetParserTest, testCSKYExtension) {
+  EXPECT_TRUE(testCSKYExtension("ck801", "trust"));
----------------
DavidSpickett wrote:
> What is the purpose of this? Seems like it would be covered by `CSKYCPUTestsPart1`.
Right. I think it is covered by CSKYCPUTestsPart1 and TargetParserTest::CSKYArchExtFeature below.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D119917/new/

https://reviews.llvm.org/D119917



More information about the llvm-commits mailing list