1 //===- TestUtilities.cpp ----------------------------------------*- C++ -*-===// 2 // 3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 // See https://llvm.org/LICENSE.txt for license information. 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 // 7 //===----------------------------------------------------------------------===// 8 9 #include "TestUtilities.h" 10 #include "llvm/ADT/SmallString.h" 11 #include "llvm/Support/FileSystem.h" 12 #include "llvm/Support/Path.h" 13 14 extern const char *TestMainArgv0; 15 16 std::string lldb_private::GetInputFilePath(const llvm::Twine &name) { 17 llvm::SmallString<128> result = llvm::sys::path::parent_path(TestMainArgv0); 18 llvm::sys::fs::make_absolute(result); 19 llvm::sys::path::append(result, "Inputs", name); 20 return result.str(); 21 } 22