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

Unified Diff: src/IceGlobalContext.h

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/IceELFStreamer.h ('k') | src/IceGlobalContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceGlobalContext.h
diff --git a/src/IceGlobalContext.h b/src/IceGlobalContext.h
index 02e216be8082a51f99db780c1b092a483b68fb82..a08262589d64c60ecb34a0030167661d95033a87 100644
--- a/src/IceGlobalContext.h
+++ b/src/IceGlobalContext.h
@@ -18,10 +18,10 @@
#include <memory>
#include "llvm/Support/Allocator.h"
-#include "llvm/Support/raw_ostream.h"
#include "IceDefs.h"
#include "IceClFlags.h"
+#include "IceELFObjectWriter.h"
#include "IceIntrinsics.h"
#include "IceRNG.h"
#include "IceTimerTree.h"
@@ -74,7 +74,7 @@ class GlobalContext {
GlobalContext &operator=(const GlobalContext &) = delete;
public:
- GlobalContext(llvm::raw_ostream *OsDump, llvm::raw_ostream *OsEmit,
+ GlobalContext(Ostream *OsDump, Ostream *OsEmit, ELFStreamer *ELFStreamer,
VerboseMask Mask, TargetArch Arch, OptLevel Opt,
IceString TestPrefix, const ClFlags &Flags);
~GlobalContext();
@@ -158,6 +158,8 @@ public:
// translation.
RandomNumberGenerator &getRNG() { return RNG; }
+ ELFObjectWriter *getObjectWriter() const { return ObjectWriter.get(); }
+
// Reset stats at the beginning of a function.
void resetStats() { StatsFunction.reset(); }
void dumpStats(const IceString &Name, bool Final = false);
@@ -212,6 +214,7 @@ private:
const ClFlags &Flags;
bool HasEmittedFirstMethod;
RandomNumberGenerator RNG;
+ std::unique_ptr<ELFObjectWriter> ObjectWriter;
CodeStats StatsFunction;
CodeStats StatsCumulative;
std::vector<TimerStack> Timers;
« no previous file with comments | « src/IceELFStreamer.h ('k') | src/IceGlobalContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698