diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-12-18 20:12:36 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-12-18 20:12:36 +0000 |
commit | ef5d0b5e97ec8e6fa395d377b09aa7755e345b4f (patch) | |
tree | 27916256fdeeb57d10d2f3d6948be5d71a703215 /unittests/TestingSupport/TestUtilities.cpp | |
parent | 76e0736e7fcfeb179779e49c05604464b1ccd704 (diff) |
Notes
Diffstat (limited to 'unittests/TestingSupport/TestUtilities.cpp')
-rw-r--r-- | unittests/TestingSupport/TestUtilities.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/unittests/TestingSupport/TestUtilities.cpp b/unittests/TestingSupport/TestUtilities.cpp new file mode 100644 index 000000000000..eacf87661420 --- /dev/null +++ b/unittests/TestingSupport/TestUtilities.cpp @@ -0,0 +1,22 @@ +//===- TestUtilities.cpp ----------------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#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(); +} |