Index: src/IceASanInstrumentation.h |
diff --git a/src/IceASanInstrumentation.h b/src/IceASanInstrumentation.h |
index 2cf5c59cb7549fef67d14a0bc4580fda693a655f..4c5dbc41be689ae61f64a41d0084b2c411a14dfd 100644 |
--- a/src/IceASanInstrumentation.h |
+++ b/src/IceASanInstrumentation.h |
@@ -21,6 +21,7 @@ |
#define SUBZERO_SRC_ICEASANINSTRUMENTATION_H |
#include "IceGlobalInits.h" |
+#include "IceInst.h" |
#include "IceInstrumentation.h" |
namespace Ice { |
@@ -31,7 +32,9 @@ class ASanInstrumentation : public Instrumentation { |
ASanInstrumentation &operator=(const ASanInstrumentation &) = delete; |
public: |
- ASanInstrumentation(GlobalContext *Ctx) : Instrumentation(Ctx), RzNum(0) {} |
+ ASanInstrumentation(GlobalContext *Ctx) : Instrumentation(Ctx), RzNum(0) { |
+ ICE_TLS_INIT_FIELD(LocalDtors); |
+ } |
void instrumentGlobals(VariableDeclarationList &Globals) override; |
private: |
@@ -40,15 +43,15 @@ private: |
VariableDeclaration *RzArray, |
SizeT &RzArraySize, |
VariableDeclaration *Global); |
- InstAlloca *createLocalRz(LoweringContext &Context, SizeT Size, |
- SizeT Alignment); |
void instrumentFuncStart(LoweringContext &Context) override; |
- void instrumentAlloca(LoweringContext &Context, InstAlloca *Instr) override; |
void instrumentCall(LoweringContext &Context, InstCall *Instr) override; |
+ void instrumentRet(LoweringContext &Context, InstRet *Instr) override; |
void instrumentLoad(LoweringContext &Context, InstLoad *Instr) override; |
void instrumentStore(LoweringContext &Context, InstStore *Instr) override; |
void instrumentAccess(LoweringContext &Context, Operand *Op, SizeT Size); |
void instrumentStart(Cfg *Func) override; |
+ void finishFunc(Cfg *Func) override; |
+ ICE_TLS_DECLARE_FIELD(std::vector<InstCall *> *, LocalDtors); |
bool DidInsertRedZones = false; |
std::atomic<uint32_t> RzNum; |
}; |