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

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: stuff Created 6 years, 1 month 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
Index: src/IceGlobalContext.h
diff --git a/src/IceGlobalContext.h b/src/IceGlobalContext.h
index eeed6afe726185d08a65cb03c80bf8d73086d611..cd2cb5700caa27999e3656d0eeed846808e804eb 100644
--- a/src/IceGlobalContext.h
+++ b/src/IceGlobalContext.h
@@ -22,6 +22,7 @@
#include "IceDefs.h"
#include "IceClFlags.h"
+#include "IceELFObjectWriter.h"
#include "IceIntrinsics.h"
#include "IceRNG.h"
#include "IceTimerTree.h"
@@ -75,8 +76,8 @@ class GlobalContext {
public:
GlobalContext(llvm::raw_ostream *OsDump, llvm::raw_ostream *OsEmit,
- VerboseMask Mask, TargetArch Arch, OptLevel Opt,
- IceString TestPrefix, const ClFlags &Flags);
+ ELFStreamer *ELFStreamer, VerboseMask Mask, TargetArch Arch,
+ OptLevel Opt, IceString TestPrefix, const ClFlags &Flags);
~GlobalContext();
// Returns true if any of the specified options in the verbose mask
@@ -158,6 +159,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 +215,7 @@ private:
const ClFlags &Flags;
bool HasEmittedFirstMethod;
RandomNumberGenerator RNG;
+ std::unique_ptr<ELFObjectWriter> ObjectWriter;
CodeStats StatsFunction;
CodeStats StatsCumulative;
std::vector<TimerStack> Timers;

Powered by Google App Engine
This is Rietveld 408576698