aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorFrancis Visoiu Mistrih <francisvm@yahoo.com>2019-06-17 16:06:00 +0000
committerFrancis Visoiu Mistrih <francisvm@yahoo.com>2019-06-17 16:06:00 +0000
commit34667519dc199d58b4556cfdc4e3ecb04365e53e (patch)
treebdfc15117967634c7f53fce1020b3910baadfc40 /clang/lib/Frontend/CompilerInvocation.cpp
parent77bc3b65424afc42031a0859c91154acdc54feaa (diff)
downloadllvm-34667519dc199d58b4556cfdc4e3ecb04365e53e.zip
llvm-34667519dc199d58b4556cfdc4e3ecb04365e53e.tar.gz
llvm-34667519dc199d58b4556cfdc4e3ecb04365e53e.tar.bz2
[Remarks] Extend -fsave-optimization-record to specify the format
Use -fsave-optimization-record=<format> to specify a different format than the default, which is YAML. For now, only YAML is supported. llvm-svn: 363573
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInvocation.cpp5
1 files changed, 5 insertions, 0 deletions
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);