aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-11-29 02:38:34 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-11-29 02:38:34 +0000
commit7d065d0f21b35f445cee13730398bc2bec6edff2 (patch)
treeb5613c24902adb360cb947ce924a85f2a3afdfc2 /lib/Frontend/CompilerInvocation.cpp
parent85b4521e34dcd4a0a4a1f0819e1123128e5a3125 (diff)
Move MainFileName option variable into CodeGenOptions instead of LangOptions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@90051 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--lib/Frontend/CompilerInvocation.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Frontend/CompilerInvocation.cpp b/lib/Frontend/CompilerInvocation.cpp
index be9bab16be..3925ff0648 100644
--- a/lib/Frontend/CompilerInvocation.cpp
+++ b/lib/Frontend/CompilerInvocation.cpp
@@ -111,6 +111,10 @@ static void CodeGenOptsToArgs(const CodeGenOptions &Opts,
Res.push_back("-Os");
} else if (Opts.OptimizationLevel != 0)
Res.push_back("-O" + llvm::utostr(Opts.OptimizationLevel));
+ if (!Opts.MainFileName.empty()) {
+ Res.push_back("-main-file-name");
+ Res.push_back(Opts.MainFileName);
+ }
// SimplifyLibCalls is only derived.
// TimePasses is only derived.
// UnitAtATime is unused.
@@ -453,10 +457,6 @@ static void LangOptsToArgs(const LangOptions &Opts,
Res.push_back("-stack-protector");
Res.push_back(llvm::utostr(Opts.getStackProtectorMode()));
}
- if (Opts.getMainFileName()) {
- Res.push_back("-main-file-name");
- Res.push_back(Opts.getMainFileName());
- }
if (Opts.InstantiationDepth != DefaultLangOpts.InstantiationDepth) {
Res.push_back("-ftemplate-depth");
Res.push_back(llvm::utostr(Opts.InstantiationDepth));