[PATCH] D119917: [Support] Add CSKY target parser and attributes parser
    David Spickett via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Fri Feb 25 01:24:27 PST 2022
    
    
  
DavidSpickett 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"));
+}
----------------
zixuan-wu wrote:
> 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?
I don't mean that you should use a random string here. 
I'm just checking that I understand the test's goal here. Since the function being tested does not validate the CPU name, there is no need to check it with every possible name. Something else will check the content of the string later.
Or in other words don't change anything I think I convinced myself how it works. :)
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D119917/new/
https://reviews.llvm.org/D119917
    
    
More information about the llvm-commits
mailing list