[clang] [llvm] [LoongArch] Add options for annotate tablejump (PR #102411)

Lu Weining via llvm-commits llvm-commits at lists.llvm.org
Sat Oct 12 00:33:03 PDT 2024


================
@@ -1888,6 +1888,14 @@ void Clang::AddLoongArchTargetArgs(const ArgList &Args,
     CmdArgs.push_back("-tune-cpu");
     CmdArgs.push_back(Args.MakeArgString(TuneCPU));
   }
+
+  if (Arg *A = Args.getLastArg(options::OPT_mannotate_tablejump,
+                               options::OPT_mno_annotate_tablejump)) {
+    if (A->getOption().matches(options::OPT_mannotate_tablejump)) {
+      CmdArgs.push_back("-mllvm");
+      CmdArgs.push_back("-loongarch-annotate-tablejump");
+    }
----------------
SixWeining wrote:

else: -loongarch-annotate-tablejump=false

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


More information about the llvm-commits mailing list