]> granicus.if.org Git - llvm/commit
dwarfgen: Don't create an AsmPrinter with an invalid ObjFile lowering
authorPavel Labath <labath@google.com>
Thu, 26 Jul 2018 13:16:06 +0000 (13:16 +0000)
committerPavel Labath <labath@google.com>
Thu, 26 Jul 2018 13:16:06 +0000 (13:16 +0000)
commit99cfb5c8a747a79c4be2ff37d2bcacd8a6b0260b
treed9672881c2c443c9805b239740ff1d9c8b29d432
parent4f48c840d005ea5af3e1e2dec7febe739f35f479
dwarfgen: Don't create an AsmPrinter with an invalid ObjFile lowering

The AsmPrinter created in the tests contained an uninitialized
TargetLoweringObjectFile. Things mostly worked regardless, because we
used a separate instance of that class to specify sections to emit.

This rearanges the object construction order so that we can avoid
creating two lowering objects. Instead, we properly initialize the
object in the AsmPrinter, and have the DWARF generator store a pointer
to it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@338026 91177308-0d34-0410-b5e6-96231b3b80d8
unittests/DebugInfo/DWARF/DwarfGenerator.cpp
unittests/DebugInfo/DWARF/DwarfGenerator.h