Add CallbackKind and use it for the SMT solver

This commit is contained in:
Leonardo Alt
2019-11-21 22:10:21 +00:00
committed by Alex Beregszaszi
parent 0201ff5a02
commit ddc478e3e4
24 changed files with 132 additions and 42 deletions
+6 -1
View File
@@ -848,10 +848,15 @@ Allowed options)",
bool CommandLineInterface::processInput()
{
ReadCallback::Callback fileReader = [this](string const& _path)
ReadCallback::Callback fileReader = [this](string const& _kind, string const& _path)
{
try
{
if (_kind != ReadCallback::kindString(ReadCallback::Kind::ReadFile))
BOOST_THROW_EXCEPTION(InternalCompilerError() << errinfo_comment(
"ReadFile callback used as callback kind " +
_kind
));
auto path = boost::filesystem::path(_path);
auto canonicalPath = boost::filesystem::weakly_canonical(path);
bool isAllowed = false;