]> granicus.if.org Git - llvm/commit
[dsymutil] Don't clone empty CUs
authorJonas Devlieghere <jonas@devlieghere.com>
Wed, 13 Feb 2019 00:32:06 +0000 (00:32 +0000)
committerJonas Devlieghere <jonas@devlieghere.com>
Wed, 13 Feb 2019 00:32:06 +0000 (00:32 +0000)
commit629efa3c8d69c8d504db299168c7ef0f9c73270e
tree47de0688a5fe7a09021d194ecf747a6dc94bde67
parent7c0006da85146897fe2837f65f5ce501e707cd7f
[dsymutil] Don't clone empty CUs

The DWARF standard says that an empty compile unit is not valid:

> Each such contribution consists of a compilation unit header (see
> Section 7.5.1.1 on page 200) followed by a single DW_TAG_compile_unit or
> DW_TAG_partial_unit debugging information entry, together with its
> children.

Therefore we shouldn't clone them in dsymutil.

Differential revision: https://reviews.llvm.org/D57979

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353903 91177308-0d34-0410-b5e6-96231b3b80d8
test/tools/dsymutil/X86/empty-CU.test
test/tools/dsymutil/X86/generate-empty-CU.test
tools/dsymutil/CompileUnit.cpp
tools/dsymutil/DwarfLinker.cpp