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

Unified Diff: src/IceGlobalContext.cpp

Issue 678533005: Subzero: Add basic ELFObjectWriter (text section, symtab, strtab, headers) (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: minor cleanup Created 6 years 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/IceGlobalContext.h ('k') | src/IceMemoryRegion.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceGlobalContext.cpp
diff --git a/src/IceGlobalContext.cpp b/src/IceGlobalContext.cpp
index 8b345d47ed0a807d5d0dcd7dcbea10594d3e2b6c..095f288ae88b8fb30982d477a733f9957b536c46 100644
--- a/src/IceGlobalContext.cpp
+++ b/src/IceGlobalContext.cpp
@@ -103,17 +103,20 @@ public:
UndefPool Undefs;
};
-GlobalContext::GlobalContext(llvm::raw_ostream *OsDump,
- llvm::raw_ostream *OsEmit, VerboseMask Mask,
+GlobalContext::GlobalContext(Ostream *OsDump, Ostream *OsEmit,
+ ELFStreamer *ELFStr, VerboseMask Mask,
TargetArch Arch, OptLevel Opt,
IceString TestPrefix, const ClFlags &Flags)
: StrDump(OsDump), StrEmit(OsEmit), VMask(Mask),
ConstPool(new ConstantPool()), Arch(Arch), Opt(Opt),
TestPrefix(TestPrefix), Flags(Flags), HasEmittedFirstMethod(false),
- RNG("") {
+ RNG(""), ObjectWriter() {
// Pre-register built-in stack names.
newTimerStackID("Total across all functions");
newTimerStackID("Per-function summary");
+ if (Flags.UseELFWriter) {
+ ObjectWriter.reset(new ELFObjectWriter(*this, *ELFStr));
+ }
}
// Scan a string for S[0-9A-Z]*_ patterns and replace them with
« no previous file with comments | « src/IceGlobalContext.h ('k') | src/IceMemoryRegion.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698