From 7c7c8e0da4e0c400e7e06c4c6658372ea0b487ea Mon Sep 17 00:00:00 2001 From: Ian Levesque Date: Tue, 16 Jun 2020 20:36:11 -0400 Subject: [xray] Option to omit the function index Summary: Add a flag to omit the xray_fn_idx to cut size overhead and relocations roughly in half at the cost of reduced performance for single function patching. Minor additions to compiler-rt support per-function patching without the index. Reviewers: dberris, MaskRay, johnislarry Subscribers: hiraditya, arphaman, cfe-commits, #sanitizers, llvm-commits Tags: #clang, #sanitizers, #llvm Differential Revision: https://reviews.llvm.org/D81995 --- clang/lib/Frontend/CompilerInvocation.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'clang/lib/Frontend/CompilerInvocation.cpp') diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index c718077..4c05717 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -1081,6 +1081,7 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK, Opts.XRayInstructionThreshold = getLastArgIntValue(Args, OPT_fxray_instruction_threshold_EQ, 200, Diags); Opts.XRayIgnoreLoops = Args.hasArg(OPT_fxray_ignore_loops); + Opts.XRayOmitFunctionIndex = Args.hasArg(OPT_fno_xray_function_index); auto XRayInstrBundles = Args.getAllArgValues(OPT_fxray_instrumentation_bundle); -- cgit v1.1