summaryrefslogtreecommitdiffstats
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.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index 06e8554d9d3..0f09db2bff3 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -410,6 +410,13 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK,
Opts.setDebugInfo(CodeGenOptions::LimitedDebugInfo);
}
Opts.DebugColumnInfo = Args.hasArg(OPT_dwarf_column_info);
+ if (Args.hasArg(OPT_gcodeview)) {
+ Opts.EmitCodeView = true;
+ Opts.DwarfVersion = 0;
+ } else if (Opts.getDebugInfo() != CodeGenOptions::NoDebugInfo) {
+ // Default Dwarf version is 4 if we are generating debug information.
+ Opts.DwarfVersion = 4;
+ }
Opts.SplitDwarfFile = Args.getLastArgValue(OPT_split_dwarf_file);
if (Args.hasArg(OPT_gdwarf_2))
Opts.DwarfVersion = 2;
@@ -417,9 +424,6 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK,
Opts.DwarfVersion = 3;
else if (Args.hasArg(OPT_gdwarf_4))
Opts.DwarfVersion = 4;
- else if (Opts.getDebugInfo() != CodeGenOptions::NoDebugInfo)
- // Default Dwarf version is 4 if we are generating debug information.
- Opts.DwarfVersion = 4;
if (const Arg *A =
Args.getLastArg(OPT_emit_llvm_uselists, OPT_no_emit_llvm_uselists))
OpenPOWER on IntegriCloud