#include "compiler/translator/tree_ops/DeferGlobalInitializers.h"
#include <vector>
#include "compiler/translator/Compiler.h"
#include "compiler/translator/IntermNode.h"
#include "compiler/translator/StaticType.h"
#include "compiler/translator/SymbolTable.h"
#include "compiler/translator/tree_ops/InitializeVariables.h"
#include "compiler/translator/tree_util/FindMain.h"
#include "compiler/translator/tree_util/IntermNode_util.h"
#include "compiler/translator/tree_util/ReplaceVariable.h"
namespace sh
{
namespace
{
constexpr const ImmutableString kInitGlobalsString("initGlobals");
void GetDeferredInitializers(TIntermDeclaration *declaration,
bool initializeUninitializedGlobals,
bool canUseLoopsToInitialize,
bool highPrecisionSupported,
bool forceDeferNonConstGlobalInitializers,
TIntermSequence *deferredInitializersOut,
std::vector<const TVariable *> *variablesToReplaceOut,
TSymbolTable *symbolTable)
{ … }
void InsertInitCallToMain(TIntermBlock *root,
TIntermSequence *deferredInitializers,
TSymbolTable *symbolTable)
{ … }
}
bool DeferGlobalInitializers(TCompiler *compiler,
TIntermBlock *root,
bool initializeUninitializedGlobals,
bool canUseLoopsToInitialize,
bool highPrecisionSupported,
bool forceDeferNonConstGlobalInitializers,
TSymbolTable *symbolTable)
{ … }
}