Add a resolve method on CompileUnit that forwards to DwarfDebug.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192014 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h b/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
index 4cdd8fc..b3bf9be 100644
--- a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
+++ b/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
@@ -15,6 +15,7 @@
#define CODEGEN_ASMPRINTER_DWARFCOMPILEUNIT_H
#include "DIE.h"
+#include "DwarfDebug.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/OwningPtr.h"
#include "llvm/ADT/StringMap.h"
@@ -23,8 +24,6 @@
namespace llvm {
-class DwarfDebug;
-class DwarfUnits;
class MachineLocation;
class MachineOperand;
class ConstantInt;
@@ -353,6 +352,12 @@
/// information entry.
DIEEntry *createDIEEntry(DIE *Entry);
+ /// resolve - Look in the DwarfDebug map for the MDNode that
+ /// corresponds to a scope reference.
+ template <typename T> T resolve(DIRef<T> Ref) const {
+ return DD->resolve(Ref);
+ }
+
private:
// DIEValueAllocator - All DIEValues are allocated through this allocator.