diff options
author | Fangrui Song <maskray@google.com> | 2019-08-02 06:07:05 +0000 |
---|---|---|
committer | Fangrui Song <maskray@google.com> | 2019-08-02 06:07:05 +0000 |
commit | d21b3d346af2f6189638d853182e389555e7ccb9 (patch) | |
tree | ef89086fd1492736105e73e06b3623df3b01df45 /compiler-rt/test/msan/Linux/bzero.cpp | |
parent | 6db8c59f210af60d882f7aedc7c9dc95d41d9696 (diff) | |
download | bcm5719-llvm-d21b3d346af2f6189638d853182e389555e7ccb9.tar.gz bcm5719-llvm-d21b3d346af2f6189638d853182e389555e7ccb9.zip |
compiler-rt: Rename .cc file in test/msan to .cpp
Like r367463, but for test/msan.
llvm-svn: 367653
Diffstat (limited to 'compiler-rt/test/msan/Linux/bzero.cpp')
-rw-r--r-- | compiler-rt/test/msan/Linux/bzero.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/compiler-rt/test/msan/Linux/bzero.cpp b/compiler-rt/test/msan/Linux/bzero.cpp new file mode 100644 index 00000000000..cb319a6cfa1 --- /dev/null +++ b/compiler-rt/test/msan/Linux/bzero.cpp @@ -0,0 +1,16 @@ +// RUN: %clangxx_msan -O0 %s -o %t && %run %t + +// REQUIRES: !android + +#include <assert.h> +#include <strings.h> +#include <sanitizer/msan_interface.h> + +int main(int argc, char *argv[]) { + char buf[100]; + assert(0 == __msan_test_shadow(buf, sizeof(buf))); + // *& to suppress bzero-to-memset optimization. + (*&bzero)(buf, 50); + assert(50 == __msan_test_shadow(buf, sizeof(buf))); + return 0; +} |