[PATCH] D63168: [clang][NewPM] Fix

Leonard Chan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 11 14:18:34 PDT 2019


leonardchan created this revision.
leonardchan added reviewers: chandlerc, echristo, phosek, serge-sans-paille.
leonardchan added a project: clang.
Herald added a subscriber: aprantl.

This contains the part of D62225 <https://reviews.llvm.org/D62225> which fixes CodeGen/split-debug-single-file.c by not placing .dwo sections when using `-enable-split-dwarf=split`.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D63168

Files:
  clang/lib/CodeGen/BackendUtil.cpp


Index: clang/lib/CodeGen/BackendUtil.cpp
===================================================================
--- clang/lib/CodeGen/BackendUtil.cpp
+++ clang/lib/CodeGen/BackendUtil.cpp
@@ -1275,7 +1275,8 @@
     NeedCodeGen = true;
     CodeGenPasses.add(
         createTargetTransformInfoWrapperPass(getTargetIRAnalysis()));
-    if (!CodeGenOpts.SplitDwarfFile.empty()) {
+    if (!CodeGenOpts.SplitDwarfFile.empty() &&
+        CodeGenOpts.getSplitDwarfMode() == CodeGenOptions::SplitFileFission) {
       DwoOS = openOutputFile(CodeGenOpts.SplitDwarfFile);
       if (!DwoOS)
         return;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D63168.204165.patch
Type: text/x-patch
Size: 598 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190611/c46507b0/attachment-0001.bin>


More information about the cfe-commits mailing list