compnerd added inline comments.

================
Comment at: clang/lib/Driver/Types.cpp:29
+  { NAME, FLAGS, TEMP_SUFFIX, TY_##PP_TYPE, PHASES, },
+#define PHASES llvm::SmallVector<phases::ID, phases::MaxNumberOfPhases>
 #include "clang/Driver/Types.def"
----------------
I think that we can abuse the preprocessor a bit and get something that is 
nicer to read.  Lets make the last parameter a variadic and pass along the 
phases to the list.  Something like:

```
ENTRY('a', "std::string")
ENTRY('b', "std::string", "std::vector<std::string>")
ENTRY('c', "std::string", "std::vector<std::string>", "int")

const struct {
  unsigned int id;
  std::vector<std::string> strings;
} array[] = {
#define ENTRY(id, strings...) { id, { strings } },
#include "reduced.def"
#undef ENTRY
};
```



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D64098



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to