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

Unified Diff: src/IceConverter.h

Issue 1776473007: Subzero. Allocate global initializers from a dedicated arena. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: fixes ther llvm2ice converter; fixes the VariableDeclarationList destructor. Created 4 years, 9 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
Index: src/IceConverter.h
diff --git a/src/IceConverter.h b/src/IceConverter.h
index 22288af503c0a846cf3c7f6762752689ad5a14fb..c670b50a12dea827e1e1577ca8c0c8643d0501ae 100644
--- a/src/IceConverter.h
+++ b/src/IceConverter.h
@@ -32,7 +32,8 @@ class Converter : public Translator {
public:
Converter(llvm::Module *Mod, GlobalContext *Ctx)
- : Translator(Ctx), Mod(Mod) {}
+ : Translator(Ctx), Mod(Mod),
+ GlobalDeclarationsPool(new VariableDeclarationList()) {}
~Converter() override = default;
@@ -52,6 +53,8 @@ private:
std::map<const llvm::GlobalValue *, GlobalDeclaration *>;
GlobalDeclarationMapType GlobalDeclarationMap;
+ std::unique_ptr<VariableDeclarationList> GlobalDeclarationsPool;
+
/// Walks module and generates names for unnamed globals using prefix
/// getFlags().DefaultGlobalPrefix, if the prefix is non-empty.
void nameUnnamedGlobalVariables(llvm::Module *Mod);

Powered by Google App Engine
This is Rietveld 408576698