[PATCH] D14759: In TargetParser, disallow duplicate CPU names. (NFC)

A. Skrobov via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 18 03:56:20 PST 2015


tyomitch added inline comments.

================
Comment at: lib/Support/TargetParser.cpp:106
@@ -105,6 +105,3 @@
 
 // List of CPU names and their arches.
 // FIXME: TableGen this.
----------------
rengolin wrote:
> Removing the comment without addressing the problem is not a fix.
I don't see what you mean here: I'm removing the comment which becomes false with this patch; and I'm keeping the FiXME: which remains relevant.

================
Comment at: lib/Support/TargetParser.cpp:577
@@ +576,3 @@
+
+// ======================================================= //
+// Make sure all names are unique and non-empty
----------------
rengolin wrote:
> I'd rather move to table-gen, which can guarantee correctness in the table-gen back-end, than adding this code.
I agree that this code is a stop-gap before a table-gen implementation arrives; but I believe it's better than no consistency checks at all.


http://reviews.llvm.org/D14759





More information about the llvm-commits mailing list