diff options
| author | David Blaikie <dblaikie@gmail.com> | 2014-02-04 01:23:52 +0000 | 
|---|---|---|
| committer | David Blaikie <dblaikie@gmail.com> | 2014-02-04 01:23:52 +0000 | 
| commit | 5e390e4df7db1ca76eaf2c31691cbb4b64963b61 (patch) | |
| tree | 5c3392414c97c774b05fbafd6e6b19a1f3060671 /llvm/lib/CodeGen | |
| parent | e6bf06bbdcf80d6480584318675fedd46cc4d86e (diff) | |
| download | bcm5719-llvm-5e390e4df7db1ca76eaf2c31691cbb4b64963b61.tar.gz bcm5719-llvm-5e390e4df7db1ca76eaf2c31691cbb4b64963b61.zip  | |
DebugInfo: Remove some unneeded conditionals now that DIBuilder no longer emits zero-length arrays as {i32 0}
A bunch of test cases needed to be cleaned up for this, many my fault -
when implementid imported modules I updated test cases by simply
duplicating the prior metadata field - which wasn't always the empty
metadata entry.
llvm-svn: 200731
Diffstat (limited to 'llvm/lib/CodeGen')
| -rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 6 | ||||
| -rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp | 3 | 
2 files changed, 3 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 24beebbd35a..c313639baa9 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -849,8 +849,7 @@ void DwarfDebug::constructSubprogramDIE(DwarfCompileUnit *TheCU,  void DwarfDebug::constructImportedEntityDIE(DwarfCompileUnit *TheCU,                                              const MDNode *N) {    DIImportedEntity Module(N); -  if (!Module.Verify()) -    return; +  assert(Module.Verify());    if (DIE *D = TheCU->getOrCreateContextDIE(Module.getContext()))      constructImportedEntityDIE(TheCU, Module, D);  } @@ -858,8 +857,7 @@ void DwarfDebug::constructImportedEntityDIE(DwarfCompileUnit *TheCU,  void DwarfDebug::constructImportedEntityDIE(DwarfCompileUnit *TheCU,                                              const MDNode *N, DIE *Context) {    DIImportedEntity Module(N); -  if (!Module.Verify()) -    return; +  assert(Module.Verify());    return constructImportedEntityDIE(TheCU, Module, Context);  } diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp index 0723eb85a28..a1db1e0a2ed 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp @@ -1532,8 +1532,7 @@ void DwarfCompileUnit::createGlobalVariableDIE(DIGlobalVariable GV) {    if (getDIE(GV))      return; -  if (!GV.isGlobalVariable()) -    return; +  assert(GV.isGlobalVariable());    DIScope GVContext = GV.getContext();    DIType GTy = GV.getType();  | 

