Remove command line option for CU hashing. This is on by default now.
authorEric Christopher <echristo@gmail.com>
Fri, 14 Mar 2014 21:20:07 +0000 (21:20 +0000)
committerEric Christopher <echristo@gmail.com>
Fri, 14 Mar 2014 21:20:07 +0000 (21:20 +0000)
Fix up testcases and use of flag.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203973 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/AsmPrinter/DwarfDebug.cpp
test/DebugInfo/X86/fission-cu.ll
test/DebugInfo/X86/sret.ll

index fa966d01c9d95dd815b9fa1052b4b2874daa4c12..4b2b7b01f172ed6b300f8fa72de6d1e82a4eb6ad 100644 (file)
@@ -60,10 +60,6 @@ static cl::opt<bool> UnknownLocations(
     cl::desc("Make an absence of debug location information explicit."),
     cl::init(false));
 
-static cl::opt<bool> GenerateCUHash("generate-cu-hash", cl::Hidden,
-                                    cl::desc("Add the CU hash as the dwo_id."),
-                                    cl::init(true));
-
 static cl::opt<bool>
 GenerateGnuPubSections("generate-gnu-dwarf-pub-sections", cl::Hidden,
                        cl::desc("Generate GNU-style pubnames and pubtypes"),
@@ -975,12 +971,8 @@ void DwarfDebug::finalizeModuleInfo() {
       DwarfCompileUnit *SkCU =
           static_cast<DwarfCompileUnit *>(TheU->getSkeleton());
       if (useSplitDwarf()) {
-        // This should be a unique identifier when we want to build .dwp files.
-        uint64_t ID = 0;
-        if (GenerateCUHash) {
-          DIEHash CUHash(Asm);
-          ID = CUHash.computeCUSignature(*TheU->getUnitDie());
-        }
+        // Emit a unique identifier for this CU.
+        uint64_t ID = DIEHash(Asm).computeCUSignature(*TheU->getUnitDie());
         TheU->addUInt(TheU->getUnitDie(), dwarf::DW_AT_GNU_dwo_id,
                       dwarf::DW_FORM_data8, ID);
         SkCU->addUInt(SkCU->getUnitDie(), dwarf::DW_AT_GNU_dwo_id,
index af179a7a9f985f2e6139bda6624443a357028a05..3833a6c5e091f83a68bc170c2cf04ae00f2ff8d6 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: llc -split-dwarf=Enable -generate-cu-hash -O0 %s -mtriple=x86_64-unknown-linux-gnu -filetype=obj -o %t
+; RUN: llc -split-dwarf=Enable -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
index cd649a8ec0e830f2e97096a4114049c3ad305ae9..c43b045c5692ba638249c04146b4d76b18705fa0 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: llc -split-dwarf=Enable -generate-cu-hash -O0 %s -mtriple=x86_64-unknown-linux-gnu -filetype=obj -o %t
+; RUN: llc -split-dwarf=Enable -O0 %s -mtriple=x86_64-unknown-linux-gnu -filetype=obj -o %t
 ; RUN: llvm-dwarfdump -debug-dump=all %t | FileCheck %s
 
 ; Based on the debuginfo-tests/sret.cpp code.