aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInvocation.cpp32
1 files changed, 15 insertions, 17 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index 5175063..2257916 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -1095,23 +1095,21 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK,
// FIXME: For backend options that are not yet recorded as function
// attributes in the IR, keep track of them so we can embed them in a
// separate data section and use them when building the bitcode.
- if (Opts.getEmbedBitcode() == CodeGenOptions::Embed_All) {
- for (const auto &A : Args) {
- // Do not encode output and input.
- if (A->getOption().getID() == options::OPT_o ||
- A->getOption().getID() == options::OPT_INPUT ||
- A->getOption().getID() == options::OPT_x ||
- A->getOption().getID() == options::OPT_fembed_bitcode ||
- A->getOption().matches(options::OPT_W_Group))
- continue;
- ArgStringList ASL;
- A->render(Args, ASL);
- for (const auto &arg : ASL) {
- StringRef ArgStr(arg);
- Opts.CmdArgs.insert(Opts.CmdArgs.end(), ArgStr.begin(), ArgStr.end());
- // using \00 to separate each commandline options.
- Opts.CmdArgs.push_back('\0');
- }
+ for (const auto &A : Args) {
+ // Do not encode output and input.
+ if (A->getOption().getID() == options::OPT_o ||
+ A->getOption().getID() == options::OPT_INPUT ||
+ A->getOption().getID() == options::OPT_x ||
+ A->getOption().getID() == options::OPT_fembed_bitcode ||
+ A->getOption().matches(options::OPT_W_Group))
+ continue;
+ ArgStringList ASL;
+ A->render(Args, ASL);
+ for (const auto &arg : ASL) {
+ StringRef ArgStr(arg);
+ Opts.CmdArgs.insert(Opts.CmdArgs.end(), ArgStr.begin(), ArgStr.end());
+ // using \00 to separate each commandline options.
+ Opts.CmdArgs.push_back('\0');
}
}