[clang] [clang][X86] Support __attribute__((model("small"/"large"))) (PR #124834)

Arthur Eubanks via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 29 12:36:41 PST 2025


================
@@ -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;
+}
----------------
aeubanks wrote:

done

https://github.com/llvm/llvm-project/pull/124834


More information about the cfe-commits mailing list