Remove attribution from file headers, per discussion on llvmdev.
[oota-llvm.git] / lib / Debugger / Debugger.cpp
index f7108e492f214660bce218972b5b0043e9697295..e8194d941f003310fb2cbf51b3fecf714cd0f12e 100644 (file)
@@ -2,8 +2,8 @@
 //
 //                     The LLVM Compiler Infrastructure
 //
-// This file was developed by the LLVM research group and is distributed under
-// the University of Illinois Open Source License. See LICENSE.TXT for details.
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
 //
 //===----------------------------------------------------------------------===//
 //
@@ -14,8 +14,9 @@
 #include "llvm/Debugger/Debugger.h"
 #include "llvm/Module.h"
 #include "llvm/ModuleProvider.h"
-#include "llvm/Bytecode/Reader.h"
+#include "llvm/Bitcode/ReaderWriter.h"
 #include "llvm/Debugger/InferiorProcess.h"
+#include "llvm/Support/MemoryBuffer.h"
 #include "llvm/ADT/StringExtras.h"
 #include <memory>
 using namespace llvm;
@@ -45,15 +46,11 @@ std::string Debugger::getProgramPath() const {
 
 static Module *
 getMaterializedModuleProvider(const std::string &Filename) {
-  try {
-    std::auto_ptr<ModuleProvider> Result(getBytecodeModuleProvider(Filename));
-    if (!Result.get()) return 0;
-
-    Result->materializeModule();
-    return Result.release()->releaseModule();
-  } catch (...) {
-    return 0;
-  }
+  std::auto_ptr<MemoryBuffer> Buffer;
+  Buffer.reset(MemoryBuffer::getFileOrSTDIN(&Filename[0], Filename.size()));
+  if (Buffer.get())
+    return ParseBitcodeFile(Buffer.get());
+  return 0;
 }
 
 /// loadProgram - If a program is currently loaded, unload it.  Then search
@@ -113,6 +110,12 @@ void Debugger::createProgram() {
   Process = InferiorProcess::create(Program, Args, Environment);
 }
 
+InferiorProcess *
+InferiorProcess::create(Module *M, const std::vector<std::string> &Arguments,
+                        const char * const *envp) {
+  throw"No supported binding to inferior processes (debugger not implemented).";
+}
+
 /// killProgram - If the program is currently executing, kill off the
 /// process and free up any state related to the currently running program.  If
 /// there is no program currently running, this just silently succeeds.