diff options
author | Karl Schimpf <kschimpf@google.com> | 2013-06-17 14:31:20 -0700 |
---|---|---|
committer | Karl Schimpf <kschimpf@google.com> | 2013-06-17 14:31:20 -0700 |
commit | b1f3b6883c3b106c76088ae4d09e31c765a7667a (patch) | |
tree | da0d7846ab93fbc9e7b48be8b310f1126e13da2d /tools | |
parent | 36362aa384aa0fc2d6682978301178b52530550d (diff) |
When running pnacl-llc sandboxed, force input to always be PNaCl bitcode.
BUG= https://code.google.com/p/nativeclient/issues/detail?id=3469
R=jvoung@chromium.org
Review URL: https://codereview.chromium.org/17295004
Diffstat (limited to 'tools')
-rw-r--r-- | tools/pnacl-llc/pnacl-llc.cpp | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/tools/pnacl-llc/pnacl-llc.cpp b/tools/pnacl-llc/pnacl-llc.cpp index e318e88f08..84f216914a 100644 --- a/tools/pnacl-llc/pnacl-llc.cpp +++ b/tools/pnacl-llc/pnacl-llc.cpp @@ -300,27 +300,11 @@ static int compileModule(char **argv, LLVMContext &Context) { #if defined(__native_client__) if (LazyBitcode) { std::string StrError; - switch (InputFileFormat) { - case LLVMFormat: - // TODO(kschimpf) Remove this case once we have fixed - // pnacl-finalize and the NaCl build system to only allow PNaCl - // bitcode files. - M.reset(getStreamedBitcodeModule( - std::string("<SRPC stream>"), - NaClBitcodeStreamer, Context, &StrError)); - break; - case PNaClFormat: - M.reset(getNaClStreamedBitcodeModule( - std::string("<SRPC stream>"), - NaClBitcodeStreamer, Context, &StrError)); - break; - default: - StrError = "Don't understand specified bitcode format"; - break; - } - if (!StrError.empty()) { + M.reset(getNaClStreamedBitcodeModule( + std::string("<SRPC stream>"), + NaClBitcodeStreamer, Context, &StrError)); + if (!StrError.empty()) Err = SMDiagnostic(InputFilename, SourceMgr::DK_Error, StrError); - } } else { // Avoid using ParseIRFile to avoid pulling in the LLParser. // Only handle binary bitcode. |