summaryrefslogtreecommitdiff
path: root/unittests/DebugInfo/DWARF/DwarfGenerator.h
diff options
context:
space:
mode:
authorPavel Labath <labath@google.com>2018-07-26 13:16:06 +0000
committerPavel Labath <labath@google.com>2018-07-26 13:16:06 +0000
commit99cfb5c8a747a79c4be2ff37d2bcacd8a6b0260b (patch)
treed9672881c2c443c9805b239740ff1d9c8b29d432 /unittests/DebugInfo/DWARF/DwarfGenerator.h
parent4f48c840d005ea5af3e1e2dec7febe739f35f479 (diff)
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
Diffstat (limited to 'unittests/DebugInfo/DWARF/DwarfGenerator.h')
-rw-r--r--unittests/DebugInfo/DWARF/DwarfGenerator.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/unittests/DebugInfo/DWARF/DwarfGenerator.h b/unittests/DebugInfo/DWARF/DwarfGenerator.h
index 6d41cb53f2c..72cb0696b97 100644
--- a/unittests/DebugInfo/DWARF/DwarfGenerator.h
+++ b/unittests/DebugInfo/DWARF/DwarfGenerator.h
@@ -36,11 +36,11 @@ class MCCodeEmitter;
class MCContext;
struct MCDwarfLineTableParams;
class MCInstrInfo;
-class MCObjectFileInfo;
class MCRegisterInfo;
class MCStreamer;
class MCSubtargetInfo;
class raw_fd_ostream;
+class TargetLoweringObjectFile;
class TargetMachine;
class Triple;
@@ -227,7 +227,6 @@ private:
class Generator {
std::unique_ptr<MCRegisterInfo> MRI;
std::unique_ptr<MCAsmInfo> MAI;
- std::unique_ptr<MCObjectFileInfo> MOFI;
std::unique_ptr<MCContext> MC;
MCAsmBackend *MAB; // Owned by MCStreamer
std::unique_ptr<MCInstrInfo> MII;
@@ -235,6 +234,7 @@ class Generator {
MCCodeEmitter *MCE; // Owned by MCStreamer
MCStreamer *MS; // Owned by AsmPrinter
std::unique_ptr<TargetMachine> TM;
+ TargetLoweringObjectFile *TLOF; // Owned by TargetMachine;
std::unique_ptr<AsmPrinter> Asm;
BumpPtrAllocator Allocator;
std::unique_ptr<DwarfStringPool> StringPool; // Entries owned by Allocator.