aboutsummaryrefslogtreecommitdiffstats
path: root/lib/System/Memory.cpp
diff options
context:
space:
mode:
authorJeffrey Yasskin <jyasskin@google.com>2010-03-15 04:57:55 +0000
committerJeffrey Yasskin <jyasskin@google.com>2010-03-15 04:57:55 +0000
commit8cf48c206f08d7d1502fe9ac135387d83cf70e85 (patch)
tree92cc2bde87b08aba5eb01639b253601ac6d30fd8 /lib/System/Memory.cpp
parente5969c6e26345d60b26e61061ddfdb12e559f344 (diff)
downloadexternal_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.cpp3
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);
}