| Index: src/IceCfg.h
|
| diff --git a/src/IceCfg.h b/src/IceCfg.h
|
| index 15f353cb56226d331eee5fd198d1fef1d601d399..3ef8776c2569d17c2e78e9c6495c430e448feb62 100644
|
| --- a/src/IceCfg.h
|
| +++ b/src/IceCfg.h
|
| @@ -15,8 +15,6 @@
|
| #ifndef SUBZERO_SRC_ICECFG_H
|
| #define SUBZERO_SRC_ICECFG_H
|
|
|
| -#include <memory>
|
| -
|
| #include "assembler.h"
|
| #include "IceClFlags.h"
|
| #include "IceDefs.h"
|
| @@ -37,11 +35,12 @@ public:
|
| // destruction requirements more explicit.
|
| static Cfg *create(GlobalContext *Ctx) {
|
| Cfg *Func = new Cfg(Ctx);
|
| - CurrentCfg = Func;
|
| + Func->updateTLS();
|
| return Func;
|
| }
|
| // Gets a pointer to the current thread's Cfg.
|
| static const Cfg *getCurrentCfg() { return CurrentCfg; }
|
| + void updateTLS() const { CurrentCfg = this; }
|
| // Gets a pointer to the current thread's Cfg's allocator.
|
| static ArenaAllocator<> *getCurrentCfgAllocator() {
|
| assert(CurrentCfg);
|
| @@ -50,6 +49,12 @@ public:
|
|
|
| GlobalContext *getContext() const { return Ctx; }
|
|
|
| + // Returns true if any of the specified options in the verbose mask
|
| + // are set. If the argument is omitted, it checks if any verbose
|
| + // options at all are set.
|
| + bool isVerbose(VerboseMask Mask = IceV_All) const { return VMask & Mask; }
|
| + void setVerbose(VerboseMask Mask) { VMask = Mask; }
|
| +
|
| // Manage the name and return type of the function being translated.
|
| void setFunctionName(const IceString &Name) { FunctionName = Name; }
|
| IceString getFunctionName() const { return FunctionName; }
|
| @@ -184,6 +189,7 @@ private:
|
| Cfg(GlobalContext *Ctx);
|
|
|
| GlobalContext *Ctx;
|
| + VerboseMask VMask;
|
| IceString FunctionName;
|
| Type ReturnType;
|
| bool IsInternalLinkage;
|
|
|