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

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: Fix nits. 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 | « pydir/utils.py ('k') | szdiff.py » ('j') | 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..7136331ec3c58fd01793327ce3344905bba02e6d 100644
--- a/src/llvm2ice.cpp
+++ b/src/llvm2ice.cpp
@@ -577,7 +577,7 @@ static cl::list<Ice::VerboseItem> VerboseList(
clEnumValN(Ice::IceV_All, "all", "Use all verbose options"),
clEnumValN(Ice::IceV_None, "none", "No verbosity"), clEnumValEnd));
static cl::opt<std::string> IRFilename(cl::Positional, cl::desc("<IR file>"),
- cl::Required);
+ cl::init("-"));
static cl::opt<std::string> OutputFilename("o",
cl::desc("Override output filename"),
cl::init("-"),
@@ -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"));
+static cl::opt<NaClFileFormat>
+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());
if (SubzeroTimingEnabled) {
std::cerr << "[Subzero timing] IR Parsing: " << T.getElapsedSec()
« no previous file with comments | « pydir/utils.py ('k') | szdiff.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698