1 //===- PDB.cpp - base header file for creating a PDB reader -----*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #include "llvm/DebugInfo/PDB/PDB.h"
12 #include "llvm/ADT/StringRef.h"
13 #include "llvm/Config/config.h"
14 #include "llvm/DebugInfo/PDB/IPDBSession.h"
15 #include "llvm/DebugInfo/PDB/PDB.h"
18 #include "llvm/DebugInfo/PDB/DIA/DIASession.h"
23 PDB_ErrorCode llvm::loadDataForPDB(PDB_ReaderType Type, StringRef Path,
24 std::unique_ptr<IPDBSession> &Session) {
25 // Create the correct concrete instance type based on the value of Type.
27 return DIASession::createFromPdb(Path, Session);
29 return PDB_ErrorCode::NoPdbImpl;
32 PDB_ErrorCode llvm::loadDataForEXE(PDB_ReaderType Type, StringRef Path,
33 std::unique_ptr<IPDBSession> &Session) {
34 // Create the correct concrete instance type based on the value of Type.
36 return DIASession::createFromExe(Path, Session);
38 return PDB_ErrorCode::NoPdbImpl;