LLVM  3.7.0
PDB.cpp
Go to the documentation of this file.
1 //===- PDB.cpp - base header file for creating a PDB reader -----*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #include "llvm/DebugInfo/PDB/PDB.h"
11 
12 #include "llvm/ADT/StringRef.h"
13 #include "llvm/Config/config.h"
15 #include "llvm/DebugInfo/PDB/PDB.h"
16 
17 #if HAVE_DIA_SDK
19 #endif
20 
21 using namespace llvm;
22 
24  std::unique_ptr<IPDBSession> &Session) {
25  // Create the correct concrete instance type based on the value of Type.
26 #if HAVE_DIA_SDK
27  return DIASession::createFromPdb(Path, Session);
28 #endif
30 }
31 
33  std::unique_ptr<IPDBSession> &Session) {
34 // Create the correct concrete instance type based on the value of Type.
35 #if HAVE_DIA_SDK
36  return DIASession::createFromExe(Path, Session);
37 #endif
39 }
PDB_ErrorCode loadDataForPDB(PDB_ReaderType Type, StringRef Path, std::unique_ptr< IPDBSession > &Session)
Definition: PDB.cpp:23
PDB_ReaderType
Specifies which PDB reader implementation is to be used.
Definition: PDBTypes.h:68
PDB_ErrorCode loadDataForEXE(PDB_ReaderType Type, StringRef Path, std::unique_ptr< IPDBSession > &Session)
Definition: PDB.cpp:32
PDB_ErrorCode
Definition: PDBTypes.h:423
The instances of the Type class are immutable: once they are created, they are never changed...
Definition: Type.h:45
static PDB_ErrorCode createFromPdb(StringRef Path, std::unique_ptr< IPDBSession > &Session)
Definition: DIASession.cpp:27
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:40
static PDB_ErrorCode createFromExe(StringRef Path, std::unique_ptr< IPDBSession > &Session)
Definition: DIASession.cpp:68