diff options
author | Jeffrey Yasskin <jyasskin@google.com> | 2010-03-15 04:57:55 +0000 |
---|---|---|
committer | Jeffrey Yasskin <jyasskin@google.com> | 2010-03-15 04:57:55 +0000 |
commit | 8cf48c206f08d7d1502fe9ac135387d83cf70e85 (patch) | |
tree | 92cc2bde87b08aba5eb01639b253601ac6d30fd8 /lib/System/Memory.cpp | |
parent | e5969c6e26345d60b26e61061ddfdb12e559f344 (diff) | |
download | external_llvm-8cf48c206f08d7d1502fe9ac135387d83cf70e85.zip external_llvm-8cf48c206f08d7d1502fe9ac135387d83cf70e85.tar.gz external_llvm-8cf48c206f08d7d1502fe9ac135387d83cf70e85.tar.bz2 |
Tell Valgrind when we modify already-executed machine code so it knows
to re-instrument the code. We depend on the system valgrind.h to
avoid adding a new license.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98529 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/System/Memory.cpp')
-rw-r--r-- | lib/System/Memory.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/System/Memory.cpp b/lib/System/Memory.cpp index e2d838d..ef23b8d 100644 --- a/lib/System/Memory.cpp +++ b/lib/System/Memory.cpp @@ -13,6 +13,7 @@ //===----------------------------------------------------------------------===// #include "llvm/System/Memory.h" +#include "llvm/System/Valgrind.h" #include "llvm/Config/config.h" namespace llvm { @@ -68,4 +69,6 @@ void llvm::sys::Memory::InvalidateInstructionCache(const void *Addr, # endif #endif // end apple + + ValgrindDiscardTranslations(Addr, Len); } |