-
Notifications
You must be signed in to change notification settings - Fork 112
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
|
||
|
||
void runViaHerbie(std::string cmd) { | ||
|
||
auto Program = "/path/to/herbie"; | ||
// stdin for reading from, and stdout for writing from | ||
// todo write input to tmpin | ||
|
||
StringRef Args[] = {"shell", tmpin, tmpout}; | ||
|
||
std::string ErrMsg; | ||
bool ExecutionFailed = false; | ||
llvm::sys::ExecuteAndWait(Program, Args, /*Env*/std::nullopt, | ||
{}, | ||
/*SecondsToWait*/0, | ||
/*MemoryLimit */0, &ErrMsg, | ||
&ExecutionFailed = nullptr); | ||
|
||
|
||
// parse output from tmpout | ||
|
||
|
||
return result; | ||
|
||
|
||
} |