[NFC][tsan] Add include guards
authorVitaly Buka <vitalybuka@google.com>
Mon, 20 Mar 2023 22:48:55 +0000 (15:48 -0700)
committerVitaly Buka <vitalybuka@google.com>
Mon, 20 Mar 2023 22:59:49 +0000 (15:59 -0700)
compiler-rt/test/sanitizer_common/print_address.h
compiler-rt/test/tsan/java.h
compiler-rt/test/tsan/test.h

index 1128c92..df31322 100644 (file)
@@ -1,6 +1,9 @@
 #include <stdio.h>
 #include <stdarg.h>
 
+#ifndef __SANITIZER_COMMON_PRINT_ADDRESS_H__
+#  define __SANITIZER_COMMON_PRINT_ADDRESS_H__
+
 void print_address(const char *str, int n, ...) {
   fprintf(stderr, "%s", str);
   va_list ap;
@@ -21,3 +24,5 @@ void print_address(const char *str, int n, ...) {
   }
   fprintf(stderr, "\n");
 }
+
+#endif // __SANITIZER_COMMON_PRINT_ADDRESS_H__
\ No newline at end of file
index 9df7fb6..b6a7129 100644 (file)
@@ -1,3 +1,6 @@
+#ifndef __TSAN_JAVA_H__
+#define __TSAN_JAVA_H__
+
 #include "test.h"
 
 extern "C" {
@@ -27,3 +30,5 @@ void __tsan_func_exit();
 }
 
 const jptr kExternalPCBit = 1ULL << 60;
+
+#endif // __TSAN_JAVA_H__
\ No newline at end of file
index efd66cb..7406318 100644 (file)
@@ -1,3 +1,6 @@
+#ifndef __TSAN_TEST_H__
+#define __TSAN_TEST_H__
+
 #include <pthread.h>
 #include <stdlib.h>
 #include <stdio.h>
@@ -133,3 +136,5 @@ void WTFAnnotateBenignRaceSized(const char *f, int l, const volatile void *mem,
 #else
 #define ASM_SYMBOL(symbol) #symbol
 #endif
+
+#endif // __TSAN_TEST_H__