Allow DWARFDebugInfoEntryMinimal::getSubroutineName to resolve cross-unit references.
[oota-llvm.git] / lib / DebugInfo / DWARFTypeUnit.h
index 05e13ff104857a2a2729f75f3b715b261c7e92a4..f861ad6d37602e484c7127a5d1a910598fd5b434 100644 (file)
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLVM_DEBUGINFO_DWARFTYPEUNIT_H
-#define LLVM_DEBUGINFO_DWARFTYPEUNIT_H
+#ifndef LLVM_LIB_DEBUGINFO_DWARFTYPEUNIT_H
+#define LLVM_LIB_DEBUGINFO_DWARFTYPEUNIT_H
 
 #include "DWARFUnit.h"
 
@@ -19,11 +19,14 @@ private:
   uint64_t TypeHash;
   uint32_t TypeOffset;
 public:
-  DWARFTypeUnit(const DWARFDebugAbbrev *DA, StringRef IS, StringRef AS,
-                StringRef RS, StringRef SS, StringRef SOS, StringRef AOS,
-                const RelocAddrMap *M, bool LE)
-      : DWARFUnit(DA, IS, AS, RS, SS, SOS, AOS, M, LE) {}
-  uint32_t getSize() const override { return DWARFUnit::getSize() + 12; }
+  DWARFTypeUnit(DWARFContext &Context, const DWARFDebugAbbrev *DA,
+                StringRef IS, StringRef RS, StringRef SS, StringRef SOS,
+                StringRef AOS, const RelocAddrMap *M, bool LE,
+                const DWARFUnitSectionBase &UnitSection)
+    : DWARFUnit(Context, DA, IS, RS, SS, SOS, AOS, M, LE, UnitSection) {}
+  uint32_t getHeaderSize() const override {
+    return DWARFUnit::getHeaderSize() + 12;
+  }
   void dump(raw_ostream &OS);
 protected:
   bool extractImpl(DataExtractor debug_info, uint32_t *offset_ptr) override;