| //===- TestUtilities.cpp ----------------------------------------*- C++ -*-===// |
| // |
| // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| // See https://llvm.org/LICENSE.txt for license information. |
| // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| // |
| //===----------------------------------------------------------------------===// |
| |
| #include "TestUtilities.h" |
| #include "llvm/ADT/SmallString.h" |
| #include "llvm/Support/FileSystem.h" |
| #include "llvm/Support/Path.h" |
| |
| extern const char *TestMainArgv0; |
| |
| std::string lldb_private::GetInputFilePath(const llvm::Twine &name) { |
| llvm::SmallString<128> result = llvm::sys::path::parent_path(TestMainArgv0); |
| llvm::sys::fs::make_absolute(result); |
| llvm::sys::path::append(result, "Inputs", name); |
| return result.str(); |
| } |