[llvm] Jump table annotations for Linux (PR #112606)

Nick Desaulniers via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 17 09:43:07 PDT 2024


================
@@ -162,6 +162,10 @@ static cl::opt<bool> EmitJumpTableSizesSection(
     cl::desc("Emit a section containing jump table addresses and sizes"),
     cl::Hidden, cl::init(false));
 
+static cl::opt<bool> AnnotateJumpTables("annotate-jump-tables",
+                                        cl::desc("Annotate jump tables"),
+                                        cl::Hidden, cl::init(false));
----------------
nickdesaulniers wrote:

fc018ebb608ee0c1239b405460e49f1835ab6175 was exactly this.  Perhaps we can add a new `-f` flag to clang for this?

(That way we have `-fannotate-jump-tables`/`-fno-annotate-jump-tables` for the compiler, rather than `-mllvm -annotate-jump-tables` for the compiler (and the linker for LTO)).

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


More information about the llvm-commits mailing list