Move DIContext.h to common DebugInfo location.
This will enable us to create a PDBContext so as to expose some
amount of debug info functionality through a common interace.
Differential Revision: http://reviews.llvm.org/D9205
Reviewed by: Alexey Samsonov
llvm-svn: 235612
diff --git a/llvm/lib/DebugInfo/DWARF/CMakeLists.txt b/llvm/lib/DebugInfo/DWARF/CMakeLists.txt
index 8c6d495..d5f8a6f 100644
--- a/llvm/lib/DebugInfo/DWARF/CMakeLists.txt
+++ b/llvm/lib/DebugInfo/DWARF/CMakeLists.txt
@@ -1,5 +1,4 @@
add_llvm_library(LLVMDebugInfoDWARF
- DIContext.cpp
DWARFAbbreviationDeclaration.cpp
DWARFAcceleratorTable.cpp
DWARFCompileUnit.cpp
@@ -19,4 +18,5 @@
ADDITIONAL_HEADER_DIRS
${LLVM_MAIN_INCLUDE_DIR}/llvm/DebugInfo/DWARF
+ ${LLVM_MAIN_INCLUDE_DIR}/llvm/DebugInfo
)
diff --git a/llvm/lib/DebugInfo/DWARF/DIContext.cpp b/llvm/lib/DebugInfo/DWARF/DIContext.cpp
deleted file mode 100644
index a1c6ca4..0000000
--- a/llvm/lib/DebugInfo/DWARF/DIContext.cpp
+++ /dev/null
@@ -1,18 +0,0 @@
-//===-- DIContext.cpp -----------------------------------------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#include "llvm/DebugInfo/DWARF/DIContext.h"
-#include "llvm/DebugInfo/DWARF/DWARFContext.h"
-using namespace llvm;
-
-DIContext::~DIContext() {}
-
-DIContext *DIContext::getDWARFContext(const object::ObjectFile &Obj) {
- return new DWARFContextInMemory(Obj);
-}
diff --git a/llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp b/llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp
index d4ecd69..406915a 100644
--- a/llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp
+++ b/llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp
@@ -256,7 +256,7 @@
return;
DWOFile = std::move(Obj.get());
DWOContext.reset(
- cast<DWARFContext>(DIContext::getDWARFContext(*DWOFile.getBinary())));
+ cast<DWARFContext>(new DWARFContextInMemory(*DWOFile.getBinary())));
if (DWOContext->getNumDWOCompileUnits() > 0)
DWOU = DWOContext->getDWOCompileUnitAtIndex(0);
}