[PATCH] D59673: [Clang] Harmonize Split DWARF options with llc

David Blaikie via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 29 09:34:58 PDT 2019

dblaikie added a comment.

Might be easier as a few patches - renaming the existing option, adding the new one, then removing the single split dwarf flag handling in favor of implying that by the absence of an output file name. (if I'm reading what this patch does)

Comment at: include/clang/Basic/CodeGenOptions.h:185-188
+  /// The name for the split debug info file used in the skeleton CU.
   std::string SplitDwarfFile;
+  /// Output filename for the split debug info, not used in the skeleton CU.
Comments are a bit inconsistent - "filename for the split debug info" versus "name for the split debug info file" - makes it perhaps a bit harder to see what the important difference is between these two values.

It might be helpful to clarify "used in the skeleton CU" as "Used as the dwo_name in the DWARF" versus "the name of the file to write the .dwo sections to" or something like that?

Comment at: lib/CodeGen/BackendUtil.cpp:847
-    if (!CodeGenOpts.SplitDwarfFile.empty() &&
-        (CodeGenOpts.getSplitDwarfMode() == CodeGenOptions::SplitFileFission)) {
-      DwoOS = openOutputFile(CodeGenOpts.SplitDwarfFile);
+    if (CodeGenOpts.EnableSplitDwarf && !CodeGenOpts.SplitDwarfOutput.empty()) {
+      DwoOS = openOutputFile(CodeGenOpts.SplitDwarfOutput);
Why did this add a check for EnableSplitDwarf here that wasn't there before?

  rC Clang



More information about the cfe-commits mailing list