1 //===- TestUtilities.cpp ----------------------------------------*- 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 "TestUtilities.h"
11 #include "llvm/ADT/SmallString.h"
12 #include "llvm/Support/FileSystem.h"
13 #include "llvm/Support/Path.h"
14 
15 extern const char *TestMainArgv0;
16 
17 std::string lldb_private::GetInputFilePath(const llvm::Twine &name) {
18   llvm::SmallString<128> result = llvm::sys::path::parent_path(TestMainArgv0);
19   llvm::sys::fs::make_absolute(result);
20   llvm::sys::path::append(result, "Inputs", name);
21   return result.str();
22 }
23