@@ -2816,8 +2816,6 @@ static void RenderDebugOptions(const ToolChain &TC, const Driver &D,
2816
2816
ArgStringList &CmdArgs,
2817
2817
codegenoptions::DebugInfoKind &DebugInfoKind,
2818
2818
const Arg *&SplitDWARFArg) {
2819
- bool IsPS4CPU = T.isPS4CPU ();
2820
-
2821
2819
if (Args.hasFlag (options::OPT_fdebug_info_for_profiling,
2822
2820
options::OPT_fno_debug_info_for_profiling, false ))
2823
2821
CmdArgs.push_back (" -fdebug-info-for-profiling" );
@@ -2900,13 +2898,14 @@ static void RenderDebugOptions(const ToolChain &TC, const Driver &D,
2900
2898
// And we handle flag -grecord-gcc-switches later with DWARFDebugFlags.
2901
2899
Args.ClaimAllArgs (options::OPT_g_flags_Group);
2902
2900
2903
- // Column info is included by default for everything except PS4 and CodeView.
2901
+ // Column info is included by default for everything except SCE and CodeView.
2904
2902
// Clang doesn't track end columns, just starting columns, which, in theory,
2905
2903
// is fine for CodeView (and PDB). In practice, however, the Microsoft
2906
2904
// debuggers don't handle missing end columns well, so it's better not to
2907
2905
// include any column info.
2908
2906
if (Args.hasFlag (options::OPT_gcolumn_info, options::OPT_gno_column_info,
2909
- /* Default=*/ !IsPS4CPU && !(IsWindowsMSVC && EmitCodeView)))
2907
+ /* Default=*/ !(IsWindowsMSVC && EmitCodeView) &&
2908
+ DebuggerTuning != llvm::DebuggerKind::SCE))
2910
2909
CmdArgs.push_back (" -dwarf-column-info" );
2911
2910
2912
2911
// FIXME: Move backend command line options to the module.
@@ -2957,8 +2956,9 @@ static void RenderDebugOptions(const ToolChain &TC, const Driver &D,
2957
2956
2958
2957
// -gdwarf-aranges turns on the emission of the aranges section in the
2959
2958
// backend.
2960
- // Always enabled on the PS4.
2961
- if (Args.hasArg (options::OPT_gdwarf_aranges) || IsPS4CPU) {
2959
+ // Always enabled for SCE tuning.
2960
+ if (Args.hasArg (options::OPT_gdwarf_aranges) ||
2961
+ DebuggerTuning == llvm::DebuggerKind::SCE) {
2962
2962
CmdArgs.push_back (" -backend-option" );
2963
2963
CmdArgs.push_back (" -generate-arange-section" );
2964
2964
}
@@ -2974,6 +2974,10 @@ static void RenderDebugOptions(const ToolChain &TC, const Driver &D,
2974
2974
if (DebuggerTuning == llvm::DebuggerKind::SCE)
2975
2975
CmdArgs.push_back (" -debug-forward-template-params" );
2976
2976
2977
+ // Do we need to explicitly import anonymous namespaces into the parent scope?
2978
+ if (DebuggerTuning == llvm::DebuggerKind::SCE)
2979
+ CmdArgs.push_back (" -dwarf-explicit-import" );
2980
+
2977
2981
RenderDebugInfoCompressionArgs (Args, CmdArgs, D);
2978
2982
}
2979
2983
0 commit comments