Don't use PathV1.h in llvm-link.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184092 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola 2013-06-17 17:32:19 +00:00
parent 7459ff4be2
commit d5bf07b466

View File

@ -21,7 +21,6 @@
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/ManagedStatic.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/PathV1.h"
#include "llvm/Support/PrettyStackTrace.h"
#include "llvm/Support/Signals.h"
#include "llvm/Support/SourceMgr.h"
@ -56,18 +55,11 @@ DumpAsm("d", cl::desc("Print assembly as linked"), cl::Hidden);
//
static inline Module *LoadFile(const char *argv0, const std::string &FN,
LLVMContext& Context) {
sys::Path Filename;
if (!Filename.set(FN)) {
errs() << "Invalid file name: '" << FN << "'\n";
return NULL;
}
SMDiagnostic Err;
if (Verbose) errs() << "Loading '" << Filename.c_str() << "'\n";
if (Verbose) errs() << "Loading '" << FN << "'\n";
Module* Result = 0;
const std::string &FNStr = Filename.str();
Result = ParseIRFile(FNStr, Err, Context);
Result = ParseIRFile(FN, Err, Context);
if (Result) return Result; // Load successful!
Err.print(argv0, errs());