[llvm] r301062 - Move Split DWARF handling to an MC option/command line argument rather than using metadata

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 21 16:35:27 PDT 2017


Author: dblaikie
Date: Fri Apr 21 18:35:26 2017
New Revision: 301062

URL: http://llvm.org/viewvc/llvm-project?rev=301062&view=rev
Log:
Move Split DWARF handling to an MC option/command line argument rather than using metadata

Since Split DWARF needs to name the actual .dwo file that is generated,
it can't be known at the time the llvm::Module is produced as it may be
merged with other Modules before the object is generated and that object
may be generated with any name.

By passing the Split DWARF file name when LLVM is producing object code
the .dwo file name in the object file can match correctly.

The support for Split DWARF for implicit modules remains the same -
using metadata to store the dwo name and dwo id so that potentially
multiple skeleton CUs referring to different dwo files can be generated
from one llvm::Module.

Modified:
    llvm/trunk/include/llvm/MC/MCTargetOptions.h
    llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
    llvm/trunk/test/CodeGen/X86/dwarf-headers.ll
    llvm/trunk/test/DebugInfo/Generic/empty.ll
    llvm/trunk/test/DebugInfo/PowerPC/tls-fission.ll
    llvm/trunk/test/DebugInfo/X86/cu-ranges-odr.ll
    llvm/trunk/test/DebugInfo/X86/cu-ranges.ll
    llvm/trunk/test/DebugInfo/X86/dwarf-pubnames-split.ll
    llvm/trunk/test/DebugInfo/X86/empty.ll
    llvm/trunk/test/DebugInfo/X86/fission-cu.ll
    llvm/trunk/test/DebugInfo/X86/fission-hash.ll
    llvm/trunk/test/DebugInfo/X86/fission-inline.ll
    llvm/trunk/test/DebugInfo/X86/fission-no-inlining.ll
    llvm/trunk/test/DebugInfo/X86/fission-ranges.ll
    llvm/trunk/test/DebugInfo/X86/generate-odr-hash.ll
    llvm/trunk/test/DebugInfo/X86/sret.ll
    llvm/trunk/test/DebugInfo/X86/tls.ll
    llvm/trunk/test/DebugInfo/X86/type_units_with_addresses.ll
    llvm/trunk/tools/llc/llc.cpp

Modified: llvm/trunk/include/llvm/MC/MCTargetOptions.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCTargetOptions.h?rev=301062&r1=301061&r2=301062&view=diff
==============================================================================
--- llvm/trunk/include/llvm/MC/MCTargetOptions.h (original)
+++ llvm/trunk/include/llvm/MC/MCTargetOptions.h Fri Apr 21 18:35:26 2017
@@ -54,6 +54,7 @@ public:
   int DwarfVersion = 0;
 
   std::string ABIName;
+  std::string SplitDwarfFile;
 
   /// Additional paths to search for `.include` directives when using the
   /// integrated assembler.

Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=301062&r1=301061&r2=301062&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Fri Apr 21 18:35:26 2017
@@ -91,14 +91,6 @@ DwarfAccelTables("dwarf-accel-tables", c
                  cl::init(Default));
 
 static cl::opt<DefaultOnOff>
-SplitDwarf("split-dwarf", cl::Hidden,
-           cl::desc("Output DWARF5 split debug info."),
-           cl::values(clEnumVal(Default, "Default for platform"),
-                      clEnumVal(Enable, "Enabled"),
-                      clEnumVal(Disable, "Disabled")),
-           cl::init(Default));
-
-static cl::opt<DefaultOnOff>
 DwarfPubSections("generate-dwarf-pub-sections", cl::Hidden,
                  cl::desc("Generate DWARF pubnames and pubtypes sections"),
                  cl::values(clEnumVal(Default, "Default for platform"),
@@ -253,11 +245,8 @@ DwarfDebug::DwarfDebug(AsmPrinter *A, Mo
 
   HasAppleExtensionAttributes = tuneForLLDB();
 
-  // Handle split DWARF. Off by default for now.
-  if (SplitDwarf == Default)
-    HasSplitDwarf = false;
-  else
-    HasSplitDwarf = SplitDwarf == Enable;
+  // Handle split DWARF.
+  HasSplitDwarf = !Asm->TM.Options.MCOptions.SplitDwarfFile.empty();
 
   // Pubnames/pubtypes on by default for GDB.
   if (DwarfPubSections == Default)
@@ -412,7 +401,7 @@ DwarfDebug::constructDwarfCompileUnit(co
   if (useSplitDwarf()) {
     NewCU.setSkeleton(constructSkeletonCU(NewCU));
     NewCU.addString(Die, dwarf::DW_AT_GNU_dwo_name,
-                    DIUnit->getSplitDebugFilename());
+                  Asm->TM.Options.MCOptions.SplitDwarfFile);
   }
 
   // LTO with assembly output shares a single line table amongst multiple CUs.
@@ -1885,7 +1874,7 @@ void DwarfDebug::emitDebugMacinfo() {
 void DwarfDebug::initSkeletonUnit(const DwarfUnit &U, DIE &Die,
                                   std::unique_ptr<DwarfCompileUnit> NewU) {
   NewU->addString(Die, dwarf::DW_AT_GNU_dwo_name,
-                  U.getCUNode()->getSplitDebugFilename());
+                  Asm->TM.Options.MCOptions.SplitDwarfFile);
 
   if (!CompilationDir.empty())
     NewU->addString(Die, dwarf::DW_AT_comp_dir, CompilationDir);

Modified: llvm/trunk/test/CodeGen/X86/dwarf-headers.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/dwarf-headers.ll?rev=301062&r1=301061&r2=301062&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/dwarf-headers.ll (original)
+++ llvm/trunk/test/CodeGen/X86/dwarf-headers.ll Fri Apr 21 18:35:26 2017
@@ -1,16 +1,16 @@
-; RUN: llc -split-dwarf=Disable -dwarf-version=4 -generate-type-units \
+; RUN: llc -dwarf-version=4 -generate-type-units \
 ; RUN:     -filetype=obj -O0 -mtriple=x86_64-unknown-linux-gnu < %s \
 ; RUN:     | llvm-dwarfdump - | FileCheck %s --check-prefix=SINGLE-4
 
-; RUN: llc -split-dwarf=Enable -dwarf-version=4 -generate-type-units \
+; RUN: llc -split-dwarf-file=foo.dwo -dwarf-version=4 -generate-type-units \
 ; RUN:     -filetype=obj -O0 -mtriple=x86_64-unknown-linux-gnu < %s \
 ; RUN:     | llvm-dwarfdump - | FileCheck %s --check-prefix=SPLIT-4
 
-; RUN: llc -split-dwarf=Disable -dwarf-version=5 -generate-type-units \
+; RUN: llc -dwarf-version=5 -generate-type-units \
 ; RUN:     -filetype=obj -O0 -mtriple=x86_64-unknown-linux-gnu < %s \
 ; RUN:     | llvm-dwarfdump - | FileCheck %s --check-prefix=SINGLE-5
 
-; RUN: llc -split-dwarf=Enable -dwarf-version=5 -generate-type-units \
+; RUN: llc -split-dwarf-file=foo.dwo -dwarf-version=5 -generate-type-units \
 ; RUN:     -filetype=obj -O0 -mtriple=x86_64-unknown-linux-gnu < %s \
 ; RUN:     | llvm-dwarfdump - | FileCheck %s --check-prefix=SPLIT-5
 

Modified: llvm/trunk/test/DebugInfo/Generic/empty.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/Generic/empty.ll?rev=301062&r1=301061&r2=301062&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/Generic/empty.ll (original)
+++ llvm/trunk/test/DebugInfo/Generic/empty.ll Fri Apr 21 18:35:26 2017
@@ -1,7 +1,7 @@
 ; REQUIRES: object-emission
 
 ; RUN: %llc_dwarf < %s -filetype=obj | llvm-dwarfdump - | FileCheck %s
-; RUN: %llc_dwarf -split-dwarf=Enable < %s -filetype=obj | llvm-dwarfdump - | FileCheck --check-prefix=FISSION %s
+; RUN: %llc_dwarf -split-dwarf-file=foo.dwo < %s -filetype=obj | llvm-dwarfdump - | FileCheck --check-prefix=FISSION %s
 
 ; darwin has a workaround for a linker bug so it always emits one line table entry
 ; XFAIL: darwin

Modified: llvm/trunk/test/DebugInfo/PowerPC/tls-fission.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/PowerPC/tls-fission.ll?rev=301062&r1=301061&r2=301062&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/PowerPC/tls-fission.ll (original)
+++ llvm/trunk/test/DebugInfo/PowerPC/tls-fission.ll Fri Apr 21 18:35:26 2017
@@ -1,4 +1,4 @@
-; RUN: llc -split-dwarf=Enable -mtriple=powerpc64-unknown-linux-gnu -O0 -filetype=asm < %s | FileCheck %s
+; RUN: llc -split-dwarf-file=foo.dwo -mtriple=powerpc64-unknown-linux-gnu -O0 -filetype=asm < %s | FileCheck %s
 
 ; FIXME: add relocation and DWARF expression support to llvm-dwarfdump & use
 ; that here instead of raw assembly printing

Modified: llvm/trunk/test/DebugInfo/X86/cu-ranges-odr.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/cu-ranges-odr.ll?rev=301062&r1=301061&r2=301062&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/cu-ranges-odr.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/cu-ranges-odr.ll Fri Apr 21 18:35:26 2017
@@ -1,4 +1,4 @@
-; RUN: llc -split-dwarf=Enable -O0 %s -mtriple=x86_64-unknown-linux-gnu -filetype=obj -o %t
+; RUN: llc -split-dwarf-file=foo.dwo -O0 %s -mtriple=x86_64-unknown-linux-gnu -filetype=obj -o %t
 ; RUN: llvm-dwarfdump -debug-dump=all %t | FileCheck %s
 ; RUN: llvm-readobj --relocations %t | FileCheck --check-prefix=CHECK-RELOCS %s
 

Modified: llvm/trunk/test/DebugInfo/X86/cu-ranges.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/cu-ranges.ll?rev=301062&r1=301061&r2=301062&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/cu-ranges.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/cu-ranges.ll Fri Apr 21 18:35:26 2017
@@ -1,8 +1,8 @@
-; RUN: llc -split-dwarf=Enable -O0 %s -function-sections -mtriple=x86_64-unknown-linux-gnu -filetype=obj -o %t
+; RUN: llc -split-dwarf-file=foo.dwo -O0 %s -function-sections -mtriple=x86_64-unknown-linux-gnu -filetype=obj -o %t
 ; RUN: llvm-dwarfdump -debug-dump=abbrev %t | FileCheck --check-prefix=FUNCTION-SECTIONS %s
 ; RUN: llvm-readobj --relocations %t | FileCheck --check-prefix=FUNCTION-SECTIONS-RELOCS %s
 
-; RUN: llc -split-dwarf=Enable -O0 %s -mtriple=x86_64-unknown-linux-gnu -filetype=obj -o %t
+; RUN: llc -split-dwarf-file=foo.dwo -O0 %s -mtriple=x86_64-unknown-linux-gnu -filetype=obj -o %t
 ; RUN: llvm-dwarfdump -debug-dump=abbrev %t | FileCheck --check-prefix=NO-FUNCTION-SECTIONS %s
 
 ; From:

Modified: llvm/trunk/test/DebugInfo/X86/dwarf-pubnames-split.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/dwarf-pubnames-split.ll?rev=301062&r1=301061&r2=301062&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/dwarf-pubnames-split.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/dwarf-pubnames-split.ll Fri Apr 21 18:35:26 2017
@@ -1,4 +1,4 @@
-; RUN: llc -mtriple=x86_64-pc-linux-gnu -split-dwarf=Enable %s -o - | FileCheck %s
+; RUN: llc -mtriple=x86_64-pc-linux-gnu -split-dwarf-file=foo.dwo %s -o - | FileCheck %s
 ; Derived from:
 
 ; int main (void) {

Modified: llvm/trunk/test/DebugInfo/X86/empty.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/empty.ll?rev=301062&r1=301061&r2=301062&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/empty.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/empty.ll Fri Apr 21 18:35:26 2017
@@ -1,5 +1,5 @@
 ; RUN: llc -mtriple i686-pc-cygwin < %s -filetype=obj | llvm-dwarfdump - | FileCheck %s
-; RUN: llc -mtriple i686-pc-cygwin -split-dwarf=Enable < %s -filetype=obj | llvm-dwarfdump - | FileCheck --check-prefix=FISSION %s
+; RUN: llc -mtriple i686-pc-cygwin -split-dwarf-file=foo.dwo < %s -filetype=obj | llvm-dwarfdump - | FileCheck --check-prefix=FISSION %s
 
 ; Expect no line table entry since there are no functions and file references in this compile unit
 ; CHECK: .debug_line contents:

Modified: llvm/trunk/test/DebugInfo/X86/fission-cu.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/fission-cu.ll?rev=301062&r1=301061&r2=301062&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/fission-cu.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/fission-cu.ll Fri Apr 21 18:35:26 2017
@@ -1,4 +1,4 @@
-; RUN: llc -split-dwarf=Enable -O0 %s -mtriple=x86_64-unknown-linux-gnu -filetype=obj -o %t
+; RUN: llc -split-dwarf-file=baz.dwo -O0 %s -mtriple=x86_64-unknown-linux-gnu -filetype=obj -o %t
 ; RUN: llvm-dwarfdump -debug-dump=all %t | FileCheck %s
 ; RUN: llvm-readobj --relocations %t | FileCheck --check-prefix=OBJ %s
 ; RUN: llvm-objdump -h %t | FileCheck --check-prefix=HDR %s

Modified: llvm/trunk/test/DebugInfo/X86/fission-hash.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/fission-hash.ll?rev=301062&r1=301061&r2=301062&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/fission-hash.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/fission-hash.ll Fri Apr 21 18:35:26 2017
@@ -1,4 +1,4 @@
-; RUN: llc -split-dwarf=Enable -O0 %s -mtriple=x86_64-unknown-linux-gnu -filetype=obj -o %t
+; RUN: llc -split-dwarf-file=foo.dwo -O0 %s -mtriple=x86_64-unknown-linux-gnu -filetype=obj -o %t
 ; RUN: llvm-dwarfdump -debug-dump=all %t | FileCheck %s
 
 ; The source is an empty file.

Modified: llvm/trunk/test/DebugInfo/X86/fission-inline.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/fission-inline.ll?rev=301062&r1=301061&r2=301062&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/fission-inline.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/fission-inline.ll Fri Apr 21 18:35:26 2017
@@ -1,4 +1,4 @@
-; RUN: llc -split-dwarf=Enable -O0 < %s -mtriple=x86_64-unknown-linux-gnu -filetype=obj > %t
+; RUN: llc -split-dwarf-file=foo.dwo -O0 < %s -mtriple=x86_64-unknown-linux-gnu -filetype=obj > %t
 ; RUN: llvm-dwarfdump -debug-dump=info %t | FileCheck %s
 ; RUN: llvm-objdump -r %t | FileCheck --check-prefix=RELOCS %s
 

Modified: llvm/trunk/test/DebugInfo/X86/fission-no-inlining.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/fission-no-inlining.ll?rev=301062&r1=301061&r2=301062&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/fission-no-inlining.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/fission-no-inlining.ll Fri Apr 21 18:35:26 2017
@@ -1,4 +1,4 @@
-; RUN: llc -split-dwarf=Enable -O0 < %s -mtriple=x86_64-unknown-linux-gnu -filetype=obj | llvm-dwarfdump -debug-dump=info - | FileCheck %s
+; RUN: llc -split-dwarf-file=foo.dwo -O0 < %s -mtriple=x86_64-unknown-linux-gnu -filetype=obj | llvm-dwarfdump -debug-dump=info - | FileCheck %s
 
 ; CHECK-NOT: DW_TAG_subprogram
 

Modified: llvm/trunk/test/DebugInfo/X86/fission-ranges.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/fission-ranges.ll?rev=301062&r1=301061&r2=301062&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/fission-ranges.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/fission-ranges.ll Fri Apr 21 18:35:26 2017
@@ -1,4 +1,4 @@
-; RUN: llc -split-dwarf=Enable -O0 %s -mtriple=x86_64-unknown-linux-gnu -filetype=obj -o %t
+; RUN: llc -split-dwarf-file=foo.dwo -O0 %s -mtriple=x86_64-unknown-linux-gnu -filetype=obj -o %t
 ; RUN: llvm-dwarfdump %t | FileCheck %s
 ; RUN: llvm-objdump -h %t | FileCheck --check-prefix=HDR %s
 

Modified: llvm/trunk/test/DebugInfo/X86/generate-odr-hash.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/generate-odr-hash.ll?rev=301062&r1=301061&r2=301062&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/generate-odr-hash.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/generate-odr-hash.ll Fri Apr 21 18:35:26 2017
@@ -4,7 +4,7 @@
 ; RUN: llvm-dwarfdump %t | FileCheck --check-prefix=CHECK --check-prefix=SINGLE %s
 ; RUN: llvm-readobj -s -t %t | FileCheck --check-prefix=OBJ_SINGLE %s
 
-; RUN: llc < %s -split-dwarf=Enable -o %t -filetype=obj -O0 -generate-type-units -mtriple=x86_64-unknown-linux-gnu
+; RUN: llc < %s -split-dwarf-file=foo.dwo -o %t -filetype=obj -O0 -generate-type-units -mtriple=x86_64-unknown-linux-gnu
 ; RUN: llvm-dwarfdump %t | FileCheck --check-prefix=CHECK --check-prefix=FISSION %s
 ; RUN: llvm-readobj -s -t %t | FileCheck --check-prefix=OBJ_FISSION %s
 

Modified: llvm/trunk/test/DebugInfo/X86/sret.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/sret.ll?rev=301062&r1=301061&r2=301062&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/sret.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/sret.ll Fri Apr 21 18:35:26 2017
@@ -1,4 +1,4 @@
-; RUN: llc -split-dwarf=Enable -O0 %s -mtriple=x86_64-unknown-linux-gnu -filetype=obj -o %t
+; RUN: llc -split-dwarf-file=foo.dwo -O0 %s -mtriple=x86_64-unknown-linux-gnu -filetype=obj -o %t
 ; RUN: llvm-dwarfdump -debug-dump=all %t | FileCheck %s --check-prefix=CHECK-DWO
 
 ; Based on the debuginfo-tests/sret.cpp code.

Modified: llvm/trunk/test/DebugInfo/X86/tls.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/tls.ll?rev=301062&r1=301061&r2=301062&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/tls.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/tls.ll Fri Apr 21 18:35:26 2017
@@ -4,7 +4,7 @@
 ; RUN: llc %s -o - -filetype=asm -O0 -mtriple=i386-linux-gnu \
 ; RUN:   | FileCheck --check-prefix=NOEMU --check-prefix=SINGLE --check-prefix=SINGLE-32 --check-prefix=GNUOP %s
 
-; RUN: llc %s -o - -filetype=asm -O0 -mtriple=x86_64-unknown-linux-gnu -split-dwarf=Enable \
+; RUN: llc %s -o - -filetype=asm -O0 -mtriple=x86_64-unknown-linux-gnu -split-dwarf-file=foo.dwo \
 ; RUN:   | FileCheck --check-prefix=NOEMU --check-prefix=FISSION --check-prefix=GNUOP %s
 
 ; RUN: llc %s -o - -filetype=asm -O0 -mtriple=x86_64-scei-ps4 \

Modified: llvm/trunk/test/DebugInfo/X86/type_units_with_addresses.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/type_units_with_addresses.ll?rev=301062&r1=301061&r2=301062&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/X86/type_units_with_addresses.ll (original)
+++ llvm/trunk/test/DebugInfo/X86/type_units_with_addresses.ll Fri Apr 21 18:35:26 2017
@@ -1,9 +1,9 @@
 ; REQUIRES: object-emission
 
-; RUN: llc -split-dwarf=Enable -filetype=obj -O0 -generate-type-units -mtriple=x86_64-unknown-linux-gnu < %s \
+; RUN: llc -split-dwarf-file=foo.dwo -filetype=obj -O0 -generate-type-units -mtriple=x86_64-unknown-linux-gnu < %s \
 ; RUN:     | llvm-dwarfdump - | FileCheck %s
 
-; RUN: llc -split-dwarf=Disable -filetype=obj -O0 -generate-type-units -mtriple=x86_64-unknown-linux-gnu < %s \
+; RUN: llc -filetype=obj -O0 -generate-type-units -mtriple=x86_64-unknown-linux-gnu < %s \
 ; RUN:     | llvm-dwarfdump - | FileCheck --check-prefix=SINGLE %s
 
 ; Test case built from:

Modified: llvm/trunk/tools/llc/llc.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llc/llc.cpp?rev=301062&r1=301061&r2=301062&view=diff
==============================================================================
--- llvm/trunk/tools/llc/llc.cpp (original)
+++ llvm/trunk/tools/llc/llc.cpp Fri Apr 21 18:35:26 2017
@@ -90,6 +90,11 @@ OptLevel("O",
 static cl::opt<std::string>
 TargetTriple("mtriple", cl::desc("Override target triple for module"));
 
+static cl::opt<std::string> SplitDwarfFile(
+    "split-dwarf-file",
+    cl::desc(
+        "Specify the name of the .dwo file to encode in the DWARF output"));
+
 static cl::opt<bool> NoVerify("disable-verify", cl::Hidden,
                               cl::desc("Do not verify input module"));
 
@@ -450,6 +455,7 @@ static int compileModule(char **argv, LL
   Options.MCOptions.AsmVerbose = AsmVerbose;
   Options.MCOptions.PreserveAsmComments = PreserveComments;
   Options.MCOptions.IASSearchPaths = IncludeDirs;
+  Options.MCOptions.SplitDwarfFile = SplitDwarfFile;
 
   std::unique_ptr<TargetMachine> Target(
       TheTarget->createTargetMachine(TheTriple.getTriple(), CPUStr, FeaturesStr,




More information about the llvm-commits mailing list