aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorUsman Nadeem <mnadeem@quicinc.com>2021-09-08 15:49:35 -0700
committerUsman Nadeem <mnadeem@quicinc.com>2021-09-08 15:49:35 -0700
commit54612a037aff42150e4c605e90a530fe1cc34c64 (patch)
tree0cb541bbb6b9c7ec6d9b4dfb91fd94204ed925ed /clang/lib/Frontend/CompilerInvocation.cpp
parentd2d2e5ea480feb09dc0edeac2eb14310de74b372 (diff)
downloadllvm-54612a037aff42150e4c605e90a530fe1cc34c64.zip
llvm-54612a037aff42150e4c605e90a530fe1cc34c64.tar.gz
llvm-54612a037aff42150e4c605e90a530fe1cc34c64.tar.bz2
Revert "[clang][Driver] Update/cleanup LTO logic to ensure that the last lto argument is honored"
This reverts commit d2d2e5ea480feb09dc0edeac2eb14310de74b372.
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInvocation.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index c23740fd..014595c 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -1419,7 +1419,7 @@ void CompilerInvocation::GenerateCodeGenArgs(
}
if (Opts.PrepareForLTO && !Opts.PrepareForThinLTO)
- GenerateArg(Args, OPT_flto_EQ, "full", SA);
+ GenerateArg(Args, OPT_flto, SA);
if (Opts.PrepareForThinLTO)
GenerateArg(Args, OPT_flto_EQ, "thin", SA);
@@ -1706,10 +1706,9 @@ bool CompilerInvocation::ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args,
}
}
- Opts.PrepareForLTO = false;
+ Opts.PrepareForLTO = Args.hasArg(OPT_flto, OPT_flto_EQ);
Opts.PrepareForThinLTO = false;
if (Arg *A = Args.getLastArg(OPT_flto_EQ)) {
- Opts.PrepareForLTO = true;
StringRef S = A->getValue();
if (S == "thin")
Opts.PrepareForThinLTO = true;