From 34667519dc199d58b4556cfdc4e3ecb04365e53e Mon Sep 17 00:00:00 2001 From: Francis Visoiu Mistrih Date: Mon, 17 Jun 2019 16:06:00 +0000 Subject: [Remarks] Extend -fsave-optimization-record to specify the format Use -fsave-optimization-record= to specify a different format than the default, which is YAML. For now, only YAML is supported. llvm-svn: 363573 --- clang/lib/Frontend/CompilerInvocation.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'clang/lib/Frontend/CompilerInvocation.cpp') diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index da7ed04..fc49aa6 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -1237,6 +1237,11 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK, NeedLocTracking = true; } + if (Arg *A = Args.getLastArg(OPT_opt_record_format)) { + Opts.OptRecordFormat = A->getValue(); + NeedLocTracking = true; + } + if (Arg *A = Args.getLastArg(OPT_Rpass_EQ)) { Opts.OptimizationRemarkPattern = GenerateOptimizationRemarkRegex(Diags, Args, A); -- cgit v1.1