Files
revng-revng/lib/DecompilerResourceFinder/ResourceFinder.cpp
T
Pietro Fezzardi 6313b3229a Decompiler: fix detection of revng-c include file.
This commit fixes the detection of the revng-c include file in build
directory, using the PathList facility provided by revng.
Before this commit, running revng-c from build directory failed to
properly identify the revng-c include if it was not already installed
but only available in the build directory itself.
2020-10-12 11:42:06 +02:00

31 lines
471 B
C++

//
// This file is distributed under the MIT License. See LICENSE.md for details.
//
// LLVM includes
#include <llvm/Support/Path.h>
#include "revng-c/DecompilerResourceFinder/ResourceFinder.h"
namespace revng {
namespace c {
class PathList ResourceFinder({
#ifdef BUILD_PATH
BUILD_PATH,
#endif
llvm::sys::path::parent_path(getCurrentExecutableFullPath()).str(),
#ifdef INSTALL_PATH
INSTALL_PATH,
#endif
});
} // end namespace c
} // end namespace revng