Add -gcodeview and -gdwarf to control which type Clang emits
Summary: By default, 'clang' emits dwarf and 'clang-cl' emits codeview. You can force emission of one or both by passing -gcodeview and -gdwarf to either driver. Reviewers: dblaikie, hans Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D11742 llvm-svn: 244097
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user