fixes for initializing globals when using -O gen-standalone-C++

This commit is contained in:
Vern Paxson 2025-01-01 13:26:58 -08:00
parent 9e85a0d27d
commit 3d58732cb3
8 changed files with 78 additions and 26 deletions

View file

@ -14,6 +14,10 @@ private:
// as a variable (not just as a function being called), track it as such.
void CreateGlobal(const ID* g);
// Low-level function for generating an initializer for a global. Takes
// into account differences for standalone-compilation.
std::shared_ptr<CPP_InitInfo> GenerateGlobalInit(const ID* g);
// Register the given identifier as a BiF. If is_var is true then the BiF
// is also used in a non-call context.
void AddBiF(const ID* b, bool is_var);