probinson added inline comments. ================ Comment at: lib/Frontend/CompilerInvocation.cpp:363-370 @@ -362,2 +362,10 @@ +// Convenience functions for debugger tuning. +static bool tuneForGDB(CodeGenOptions &Opts) { + return Opts.getDebuggerTuning() == CodeGenOptions::DebuggerKindGDB; +} +static bool tuneForLLDB(CodeGenOptions &Opts) { + return Opts.getDebuggerTuning() == CodeGenOptions::DebuggerKindLLDB; +} + static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK, ---------------- echristo wrote: > This seems like overkill for a single case. I suppose... having the big hairy test inline isn't *that* unreadable.
================ Comment at: lib/Frontend/CompilerInvocation.cpp:446-448 @@ -445,3 +445,5 @@ Opts.DebugTypeExtRefs = Args.hasArg(OPT_dwarf_ext_refs); - Opts.DebugExplicitImport = Triple.isPS4CPU(); + Opts.DebugExplicitImport = + Opts.getDebuggerTuning() != CodeGenOptions::DebuggerKindGDB && + Opts.getDebuggerTuning() != CodeGenOptions::DebuggerKindLLDB; ---------------- echristo wrote: > Why not just a positive for debugger tuning SCE? Because the default (i.e., no tuning specified) behavior should be to conform to the DWARF spec, which basically says you need the explicit import. There's a new extra RUN line in the test, with no tuning specified, to verify this. GDB and LLDB are the oddballs here, they implement a special case for namespaces whose name meets certain criteria, and do something beyond what DWARF says to do. So, the condition is written to express that. http://reviews.llvm.org/D15881 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits