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 | cec7ce78d7fbf467aab075a3ce1fd128261b1a88 (patch) | |
tree | 2d4caac78fa8f074aa95ef77ca6d9512e4acfb48 /lib | |
parent | ee3a79a1e482e4bef1ebca525ec586dd2d4a69e2 (diff) | |
download | llvm-cec7ce78d7fbf467aab075a3ce1fd128261b1a88.tar.gz llvm-cec7ce78d7fbf467aab075a3ce1fd128261b1a88.tar.bz2 llvm-cec7ce78d7fbf467aab075a3ce1fd128261b1a88.tar.xz |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200731 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 6 | ||||
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfUnit.cpp | 3 |
2 files changed, 3 insertions, 6 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 24beebbd35..c313639baa 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/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/lib/CodeGen/AsmPrinter/DwarfUnit.cpp b/lib/CodeGen/AsmPrinter/DwarfUnit.cpp index 0723eb85a2..a1db1e0a2e 100644 --- a/lib/CodeGen/AsmPrinter/DwarfUnit.cpp +++ b/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(); |