[libc-commits] [libc] 3f3f88f - [libc][Obvious] Add a file which was missed in 001a12ed59c354aa759ff3e104748c36803cfaa2.

Siva Chandra Reddy via libc-commits libc-commits at lists.llvm.org
Mon Mar 8 15:40:54 PST 2021


Author: Siva Chandra Reddy
Date: 2021-03-08T15:39:29-08:00
New Revision: 3f3f88fb95033b0461f14bc32b2d4267e06edba0

URL: https://github.com/llvm/llvm-project/commit/3f3f88fb95033b0461f14bc32b2d4267e06edba0
DIFF: https://github.com/llvm/llvm-project/commit/3f3f88fb95033b0461f14bc32b2d4267e06edba0.diff

LOG: [libc][Obvious] Add a file which was missed in 001a12ed59c354aa759ff3e104748c36803cfaa2.

Added: 
    libc/src/__support/sanitizer_annotations.h

Modified: 
    

Removed: 
    


################################################################################
diff  --git a/libc/src/__support/sanitizer_annotations.h b/libc/src/__support/sanitizer_annotations.h
new file mode 100644
index 000000000000..ea1bb0af7e4c
--- /dev/null
+++ b/libc/src/__support/sanitizer_annotations.h
@@ -0,0 +1,19 @@
+//===-- Convenient sanitizer annotations ----------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_LIBC_SRC_SUPPORT_SANITIZER_ANNOTATIONS_H
+#define LLVM_LIBC_SRC_SUPPORT_SANITIZER_ANNOTATIONS_H
+
+#if __has_feature(memory_sanitizer)
+#include <sanitizer/msan_interface.h>
+#define SANITIZER_MEMORY_INITIALIZED(addr, size) __msan_unpoison(addr, size)
+#else
+#define SANITIZER_MEMORY_INITIALIZED(ptr, size)
+#endif
+
+#endif // LLVM_LIBC_SRC_SUPPORT_SANITIZER_ANNOTATIONS_H


        


More information about the libc-commits mailing list