aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/DebugInfo/PDB/PDB.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/DebugInfo/PDB/PDB.cpp')
-rw-r--r--llvm/lib/DebugInfo/PDB/PDB.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/llvm/lib/DebugInfo/PDB/PDB.cpp b/llvm/lib/DebugInfo/PDB/PDB.cpp
index bb40942..723d1d2 100644
--- a/llvm/lib/DebugInfo/PDB/PDB.cpp
+++ b/llvm/lib/DebugInfo/PDB/PDB.cpp
@@ -17,23 +17,28 @@
#if HAVE_DIA_SDK
#include "llvm/DebugInfo/PDB/DIA/DIASession.h"
#endif
+#include "llvm/DebugInfo/PDB/Raw/RawSession.h"
using namespace llvm;
PDB_ErrorCode llvm::loadDataForPDB(PDB_ReaderType Type, StringRef Path,
std::unique_ptr<IPDBSession> &Session) {
// Create the correct concrete instance type based on the value of Type.
+ if (Type == PDB_ReaderType::Raw)
+ return RawSession::createFromPdb(Path, Session);
+
#if HAVE_DIA_SDK
return DIASession::createFromPdb(Path, Session);
#endif
- return PDB_ErrorCode::NoDiaSupport;
}
PDB_ErrorCode llvm::loadDataForEXE(PDB_ReaderType Type, StringRef Path,
std::unique_ptr<IPDBSession> &Session) {
// Create the correct concrete instance type based on the value of Type.
+ if (Type == PDB_ReaderType::Raw)
+ return RawSession::createFromExe(Path, Session);
+
#if HAVE_DIA_SDK
return DIASession::createFromExe(Path, Session);
#endif
- return PDB_ErrorCode::NoDiaSupport;
}