[compiler-rt] r229389 - [Msan] Improve the EXPECT_NOT_POISONED() macro to provide the original line number
Viktor Kutuzov
vkutuzov at accesssoftek.com
Mon Feb 16 05:30:52 PST 2015
Author: vkutuzov
Date: Mon Feb 16 07:30:52 2015
New Revision: 229389
URL: http://llvm.org/viewvc/llvm-project?rev=229389&view=rev
Log:
[Msan] Improve the EXPECT_NOT_POISONED() macro to provide the original line number
Differential Revision: http://reviews.llvm.org/D7341
Modified:
compiler-rt/trunk/lib/msan/tests/msan_test.cc
Modified: compiler-rt/trunk/lib/msan/tests/msan_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/msan/tests/msan_test.cc?rev=229389&r1=229388&r2=229389&view=diff
==============================================================================
--- compiler-rt/trunk/lib/msan/tests/msan_test.cc (original)
+++ compiler-rt/trunk/lib/msan/tests/msan_test.cc Mon Feb 16 07:30:52 2015
@@ -168,11 +168,11 @@ void ExpectPoisonedWithOrigin(const T& t
EXPECT_EQ(origin, __msan_get_origin((void*)&t));
}
-#define EXPECT_NOT_POISONED(x) ExpectNotPoisoned(x)
+#define EXPECT_NOT_POISONED(x) EXPECT_EQ(true, TestForNotPoisoned((x)))
template<typename T>
-void ExpectNotPoisoned(const T& t) {
- EXPECT_EQ(-1, __msan_test_shadow((void*)&t, sizeof(t)));
+bool TestForNotPoisoned(const T& t) {
+ return __msan_test_shadow((void*)&t, sizeof(t)) == -1;
}
static U8 poisoned_array[100];
More information about the llvm-commits
mailing list