diff lib/DebugInfo/PDB/PDB.cpp @ 95:afa8332a0e37 LLVM3.8

LLVM 3.8
author Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
date Tue, 13 Oct 2015 17:48:58 +0900
parents 60c9769439b8
children 7d135dc70f03
line wrap: on
line diff
--- a/lib/DebugInfo/PDB/PDB.cpp	Wed Feb 18 14:56:07 2015 +0900
+++ b/lib/DebugInfo/PDB/PDB.cpp	Tue Oct 13 17:48:58 2015 +0900
@@ -20,11 +20,20 @@
 
 using namespace llvm;
 
-std::unique_ptr<IPDBSession> llvm::createPDBReader(PDB_ReaderType Type,
-                                                   StringRef Path) {
+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 HAVE_DIA_SDK
-  return std::unique_ptr<DIASession>(DIASession::createFromPdb(Path));
+  return DIASession::createFromPdb(Path, Session);
 #endif
-  return nullptr;
+  return PDB_ErrorCode::NoPdbImpl;
 }
+
+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 HAVE_DIA_SDK
+  return DIASession::createFromExe(Path, Session);
+#endif
+  return PDB_ErrorCode::NoPdbImpl;
+}