Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(219)

Unified Diff: src/llvm2ice.cpp

Issue 277033003: Modify pnacl subzero to be able to read pnacl bitcode files. (Closed) Base URL: https://gerrit.chromium.org/gerrit/p/native_client/pnacl-subzero.git@master
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/llvm2ice.cpp
diff --git a/src/llvm2ice.cpp b/src/llvm2ice.cpp
index df9061b8d73033e406e8b40d4709a34f939a047b..1e1ac31cccfa65f013929a2d8a64bd3fb4bbb147 100644
--- a/src/llvm2ice.cpp
+++ b/src/llvm2ice.cpp
@@ -594,6 +594,16 @@ DisableTranslation("notranslate", cl::desc("Disable Subzero translation"));
static cl::opt<bool> SubzeroTimingEnabled(
"timing", cl::desc("Enable breakdown timing of Subzero translation"));
+cl::opt<NaClFileFormat>
Jim Stichnoth 2014/05/09 23:02:42 Make this static for consistency with other cl::op
Karl 2014/05/14 19:31:27 Done.
+InputFileFormat(
+ "bitcode-format",
+ cl::desc("Define format of input file:"),
+ cl::values(
+ clEnumValN(LLVMFormat, "llvm", "LLVM file (default)"),
+ clEnumValN(PNaClFormat, "pnacl", "PNaCl bitcode file"),
+ clEnumValEnd),
+ cl::init(LLVMFormat));
+
int main(int argc, char **argv) {
cl::ParseCommandLineOptions(argc, argv);
@@ -603,7 +613,7 @@ int main(int argc, char **argv) {
{
Ice::Timer T;
- Mod = ParseIRFile(IRFilename, Err, getGlobalContext());
+ Mod = NaClParseIRFile(IRFilename, InputFileFormat, Err, getGlobalContext());
Jim Stichnoth 2014/05/09 23:02:42 Would it be possible to add a -bitcode-format=pnac
Karl 2014/05/14 19:31:27 Done.
if (SubzeroTimingEnabled) {
std::cerr << "[Subzero timing] IR Parsing: " << T.getElapsedSec()
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698