Index: src/IceASanInstrumentation.cpp |
diff --git a/src/IceASanInstrumentation.cpp b/src/IceASanInstrumentation.cpp |
index 45ec038f4ed91c596e7a5f9a7ee242096441973f..36ffaae0543ec60356cd3421f150ec9dc547515d 100644 |
--- a/src/IceASanInstrumentation.cpp |
+++ b/src/IceASanInstrumentation.cpp |
@@ -15,7 +15,9 @@ |
#include "IceASanInstrumentation.h" |
#include "IceBuildDefs.h" |
+#include "IceCfgNode.h" |
#include "IceGlobalInits.h" |
+#include "IceInst.h" |
#include <sstream> |
@@ -109,4 +111,16 @@ ASanInstrumentation::createRz(VariableDeclarationList *List, |
return Rz; |
} |
+void ASanInstrumentation::instrumentStart(Cfg *Func) { |
+ Constant *ShadowMemInit = |
+ Ctx->getConstantExternSym(Ctx->getGlobalString("__asan_init")); |
+ constexpr SizeT NumArgs = 0; |
+ constexpr Variable *Void = nullptr; |
+ constexpr bool HasTailCall = false; |
Jim Stichnoth
2016/06/15 00:19:35
Newer code in Subzero uses a documentation idiom f
tlively
2016/06/15 16:32:00
Done.
|
+ |
+ auto *Call = |
+ InstCall::create(Func, NumArgs, Void, ShadowMemInit, HasTailCall); |
+ Func->getEntryNode()->getInsts().push_front(Call); |
+} |
+ |
} // end of namespace Ice |