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

Unified Diff: src/IceCompiler.cpp

Issue 1960393002: Subzero: Add necessary PNaCl files for standalone build. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero@master
Patch Set: make format Created 4 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 | « src/IceCompileServer.cpp ('k') | src/IceInst.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceCompiler.cpp
diff --git a/src/IceCompiler.cpp b/src/IceCompiler.cpp
index 08e1a147d60222ff8581d4972cc01748569f034d..d605610bba4d52bbb84e4f3b6e7325d3aee900af 100644
--- a/src/IceCompiler.cpp
+++ b/src/IceCompiler.cpp
@@ -87,9 +87,11 @@ void Compiler::run(const Ice::ClFlags &Flags, GlobalContext &Ctx,
if (BuildOnRead) {
std::unique_ptr<PNaClTranslator> PTranslator(new PNaClTranslator(&Ctx));
#ifdef PNACL_LLVM
- std::unique_ptr<llvm::StreamingMemoryObject> MemObj(new llvm::StreamingMemoryObjectImpl(InputStream.release()));
-#else // !PNACL_LLVM
- std::unique_ptr<llvm::StreamingMemoryObject> MemObj(new llvm::StreamingMemoryObject(std::move(InputStream)));
+ std::unique_ptr<llvm::StreamingMemoryObject> MemObj(
+ new llvm::StreamingMemoryObjectImpl(InputStream.release()));
+#else // !PNACL_LLVM
+ std::unique_ptr<llvm::StreamingMemoryObject> MemObj(
+ new llvm::StreamingMemoryObject(std::move(InputStream)));
#endif // !PNACL_LLVM
PTranslator->translate(IRFilename, std::move(MemObj));
Translator.reset(PTranslator.release());
@@ -131,11 +133,10 @@ void Compiler::run(const Ice::ClFlags &Flags, GlobalContext &Ctx,
std::unique_ptr<llvm::Module> Mod =
NaClParseIRFile(IRFilename, Flags.getInputFileFormat(), Err,
llvm::getGlobalContext(), DiagnosticHandler);
-#else // !PNACL_LLVM
+#else // !PNACL_LLVM
llvm::DiagnosticHandlerFunction DiagnosticHandler = nullptr;
llvm::LLVMContext Context;
- std::unique_ptr<llvm::Module> Mod =
- parseIRFile(IRFilename, Err, Context);
+ std::unique_ptr<llvm::Module> Mod = parseIRFile(IRFilename, Err, Context);
#endif // !PNACL_LLVM
if (!Mod) {
Err.print(Flags.getAppName().c_str(), llvm::errs());
« no previous file with comments | « src/IceCompileServer.cpp ('k') | src/IceInst.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698