From aa4e6eea9cbe85813515530f1b15b7f6b9474be1 Mon Sep 17 00:00:00 2001 From: Derek Bruening Date: Tue, 24 May 2016 22:22:20 +0000 Subject: [esan] Add compilation unit init/exit routines. Summary: Adds processCompilationUnitInit and processCompilationUnitExit for compilation unit init/exit. Adds a tool-specific argument passed to esan_init. Adds the dtor and esan_exit called from the dtor. A test will be added separately (adding it here results in failure until the corresponding compilation patch is in place). Reviewers: aizatsky Subscribers: kubabrecka, bruening, kcc, vitalybuka, eugenis, llvm-commits Differential Revision: http://reviews.llvm.org/D20486 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@270624 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/esan/esan.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/esan/esan.h') diff --git a/lib/esan/esan.h b/lib/esan/esan.h index c231d3c21..2dc8d1991 100644 --- a/lib/esan/esan.h +++ b/lib/esan/esan.h @@ -37,6 +37,10 @@ extern ToolType WhichTool; void initializeLibrary(ToolType Tool); int finalizeLibrary(); +// Esan creates the variable per tool per compilation unit at compile time +// and passes its pointer Ptr to the runtime library. +void processCompilationUnitInit(void *Ptr); +void processCompilationUnitExit(void *Ptr); void processRangeAccess(uptr PC, uptr Addr, int Size, bool IsWrite); void initializeInterceptors(); -- cgit v1.2.3