================ @@ -1073,6 +1073,36 @@ static llvm::StringRef canonicalizePlatformName(llvm::StringRef Platform) { .Case("ShaderModel", "shadermodel") .Default(Platform); } +static std::vector<llvm::StringRef> equivalentPlatformNames(llvm::StringRef Platform) { ---------------- cachemeifyoucan wrote:
Ah, right, the `ArrayRef` lives but the underlying storage might not. It might be clearer if the StringSwitch is `StringSwift<std::vector<llvm::StringRef>>`. Alternative is to initialized a static StringMap to lookup (but probably that should not live in the `.td` file). https://github.com/llvm/llvm-project/pull/105855 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits