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