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() |