[PATCH] D41087: [Preprocessor] Implement __is_target_{arch|vendor|os|environment} function-like builtin macros

Bob Wilson via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 14 23:04:54 PST 2017


bob.wilson added a comment.

I'm concerned here about the check for the names as written vs. the canonical names. @compnerd pointed out one specific case with armv7, and I see that you've got special handling for "darwin", but I think there are more. What about "arm64" vs. the canonical "aarch64"? Look through the triple parsing code in Triple.cpp and I'm pretty sure you'll find more. I had been thinking about using the canonical names. However, that's not ideal either because the canonical names intentionally exclude suffixes that some users may want to distinguish (e.g., armv7 vs armv7k).


Repository:
  rC Clang

https://reviews.llvm.org/D41087





More information about the cfe-commits mailing list