================
@@ -3369,6 +3369,33 @@ static void handleSectionAttr(Sema &S, Decl *D, const 
ParsedAttr &AL) {
   }
 }
 
+static void handleCodeModelAttr(Sema &S, Decl *D, const ParsedAttr &AL) {
+  StringRef CM;
+  StringRef Str;
+  SourceLocation LiteralLoc;
+  bool Ok = false;
+  // Check that it is a string.
+  if (!S.checkStringLiteralArgumentAttr(AL, 0, Str, &LiteralLoc))
+    return;
+
+  CM = Str;
+  if (S.getASTContext().getTargetInfo().getTriple().isLoongArch()) {
+    Ok = CM == "normal" || CM == "medium" || CM == "extreme";
+    CM = llvm::StringSwitch<StringRef>(CM)
+             .Case("normal", "small")
+             .Case("extreme", "large")
+             .Default(CM);
+  }
+
+  // Check that the value.
----------------
heiher wrote:

Done

https://github.com/llvm/llvm-project/pull/72078
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to