mirror of
https://github.com/llvm/llvm-project.git
synced 2025-05-03 03:26:06 +00:00
Allow specifying an input file for the program being executed
llvm-svn: 5888
This commit is contained in:
parent
487bb80496
commit
68efaa7ad9
@ -34,6 +34,10 @@ namespace {
|
|||||||
clEnumValN(RunLLC, "run-llc", "Compile with LLC"),
|
clEnumValN(RunLLC, "run-llc", "Compile with LLC"),
|
||||||
clEnumValN(RunCBE, "run-cbe", "Compile with CBE"),
|
clEnumValN(RunCBE, "run-cbe", "Compile with CBE"),
|
||||||
0));
|
0));
|
||||||
|
|
||||||
|
cl::opt<std::string>
|
||||||
|
InputFile("input", cl::init("/dev/null"),
|
||||||
|
cl::desc("Filename to pipe in as stdin (default: /dev/null)"));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// AbstractInterpreter Class - Subclasses of this class are used to execute
|
/// AbstractInterpreter Class - Subclasses of this class are used to execute
|
||||||
@ -86,7 +90,7 @@ int LLI::ExecuteProgram(const std::string &Bytecode,
|
|||||||
};
|
};
|
||||||
|
|
||||||
return RunProgramWithTimeout(LLIPath, Args,
|
return RunProgramWithTimeout(LLIPath, Args,
|
||||||
"/dev/null", OutputFile, OutputFile);
|
InputFile, OutputFile, OutputFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user