================ @@ -2949,6 +2950,13 @@ static void handleSectionAttr(Sema &S, Decl *D, const ParsedAttr &AL) { } } +static bool isValidCodeModelAttr(Sema &S, StringRef Str) { + bool IsX8664Target = + S.Context.getTargetInfo().getTriple().getArch() == llvm::Triple::x86_64; + bool IsX8664Spelling = Str == "small" || Str == "large"; + return IsX8664Target == IsX8664Spelling; +} ---------------- pranavk wrote:
This is correct but slightly harder to read, I feel. I think just simple if/else wrapping which attributes are valid would be easier to read. https://github.com/llvm/llvm-project/pull/124834 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits