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

Unified Diff: src/IceCompileServer.cpp

Issue 1215463014: Modify how textual bitcode is injected into pnacl-sz. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix issues in path set 3. Created 5 years, 5 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 | « src/IceClFlagsExtra.h ('k') | src/Makefile » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceCompileServer.cpp
diff --git a/src/IceCompileServer.cpp b/src/IceCompileServer.cpp
index 23874f0f5ac48b443c8945155e95ccda9e782c2f..b7bc72b7ba15eefc937e8d657955ddbaa3eefb63 100644
--- a/src/IceCompileServer.cpp
+++ b/src/IceCompileServer.cpp
@@ -21,8 +21,6 @@
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-parameter"
-// Include code to handle converting textual bitcode records to binary (for
-// INPUT_IS_TEXTUAL_BITCODE).
#include "llvm/Bitcode/NaCl/NaClBitcodeMungeUtils.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/raw_os_ostream.h"
@@ -39,10 +37,6 @@ namespace Ice {
namespace {
-static_assert(!(BuildDefs::textualBitcode() && PNACL_BROWSER_TRANSLATOR),
- "Can not define INPUT_IS_TEXTUAL_BITCODE when building browswer "
- "translator");
-
// Define a SmallVector backed buffer as a data stream, so that it
// can hold the generated binary version of the textual bitcode in the
// input file.
@@ -64,12 +58,12 @@ TextDataStreamer *TextDataStreamer::create(const IceString &Filename,
llvm::raw_string_ostream ErrStrm(*Err);
if (std::error_code EC = llvm::readNaClRecordTextAndBuildBitcode(
Filename, Streamer->BitcodeBuffer, &ErrStrm)) {
- ErrStrm << EC.message(); // << "\n";
+ ErrStrm << EC.message();
ErrStrm.flush();
delete Streamer;
return nullptr;
}
- // ErrStrm.flush();
+ ErrStrm.flush();
return Streamer;
}
@@ -151,9 +145,13 @@ void CLCompileServer::run() {
} break;
}
+ if (BuildDefs::minimal() && ExtraFlags.getBitcodeAsText())
+ llvm::report_fatal_error("Can't specify 'bitcode-as-text' flag in "
+ "minimal build");
+
IceString StrError;
std::unique_ptr<llvm::DataStreamer> InputStream(
- BuildDefs::textualBitcode()
+ (!BuildDefs::minimal() && ExtraFlags.getBitcodeAsText())
? TextDataStreamer::create(ExtraFlags.getIRFilename(), &StrError)
: llvm::getDataFileStreamer(ExtraFlags.getIRFilename(), &StrError));
if (!StrError.empty() || !InputStream) {
« no previous file with comments | « src/IceClFlagsExtra.h ('k') | src/Makefile » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698