[libc][Obvious][NFC] A bunch of cosmetic cleanup.
* Added missing header guards.
* Fixed license header format in a few files.
* Renamed files to more suitable names.
GitOrigin-RevId: d9bbad277c44a305b72d7d63faac4887bd65a564
diff --git a/fuzzing/math/RemQuoDiff.h b/fuzzing/math/RemQuoDiff.h
index f37cf3c..b934bc8 100644
--- a/fuzzing/math/RemQuoDiff.h
+++ b/fuzzing/math/RemQuoDiff.h
@@ -6,6 +6,9 @@
//
//===----------------------------------------------------------------------===//
+#ifndef LLVM_LIBC_FUZZING_MATH_REMQUO_H
+#define LLVM_LIBC_FUZZING_MATH_REMQUO_H
+
#include "src/__support/FPUtil/FPBits.h"
#include <math.h>
@@ -46,3 +49,5 @@
if (bits1.uintval() != bits2.uintval())
__builtin_trap();
}
+
+#endif // LLVM_LIBC_FUZZING_MATH_REMQUO_H
diff --git a/fuzzing/stdlib/CMakeLists.txt b/fuzzing/stdlib/CMakeLists.txt
index 436125b..0016f4f 100644
--- a/fuzzing/stdlib/CMakeLists.txt
+++ b/fuzzing/stdlib/CMakeLists.txt
@@ -7,9 +7,9 @@
)
add_libc_fuzzer(
- atof_fuzz
+ atof_differential_fuzz
SRCS
- atof_fuzz.cpp
+ atof_differential_fuzz.cpp
HDRS
StringParserOutputDiff.h
DEPENDS
diff --git a/fuzzing/stdlib/atof_fuzz.cpp b/fuzzing/stdlib/atof_differential_fuzz.cpp
similarity index 100%
rename from fuzzing/stdlib/atof_fuzz.cpp
rename to fuzzing/stdlib/atof_differential_fuzz.cpp
diff --git a/include/sys/mman.h.def b/include/sys/mman.h.def
index 738aa3e..23435c7 100644
--- a/include/sys/mman.h.def
+++ b/include/sys/mman.h.def
@@ -6,6 +6,11 @@
//
//===----------------------------------------------------------------------===//
+#ifndef LLVM_LIBC_SYS_MMAN_H
+#define LLVM_LIBC_SYS_MMAN_H
+
#include <__llvm-libc-common.h>
%%public_api()
+
+#endif // LLVM_LIBC_SYS_MMAN_H
diff --git a/include/sys/syscall.h.def b/include/sys/syscall.h.def
index 5262f07..5cb6a20 100644
--- a/include/sys/syscall.h.def
+++ b/include/sys/syscall.h.def
@@ -6,7 +6,12 @@
//
//===----------------------------------------------------------------------===//
+#ifndef LLVM_LIBC_SYS_SYSCALL_H
+#define LLVM_LIBC_SYS_SYSCALL_H
+
<!> If syscall.h were a linux only file, then we do not need this indirection.
<!> However, to keep the option of a non-linux OS requiring a syscall.h file,
<!> with its own special syscall numbers, we use this indirection.
%%include_file(${syscall_numbers})
+
+#endif // LLVM_LIBC_SYS_SYSCALL_H
diff --git a/src/__support/architectures.h b/src/__support/architectures.h
index 485faae..4975d22 100644
--- a/src/__support/architectures.h
+++ b/src/__support/architectures.h
@@ -1,4 +1,4 @@
-//===-- Compile time architecture detection -------------------------------===//
+//===-- Compile time architecture detection ---------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -6,6 +6,9 @@
//
//===----------------------------------------------------------------------===//
+#ifndef LLVM_LIBC_SUPPORT_ARCHITECTURES_H
+#define LLVM_LIBC_SUPPORT_ARCHITECTURES_H
+
#if defined(__pnacl__) || defined(__CLR_VER)
#define LLVM_LIBC_ARCH_VM
#endif
@@ -33,3 +36,5 @@
#if (defined(LLVM_LIBC_ARCH_AARCH64) || defined(LLVM_LIBC_ARCH_ARM))
#define LLVM_LIBC_ARCH_ANY_ARM
#endif
+
+#endif // LLVM_LIBC_SUPPORT_ARCHITECTURES_H
diff --git a/src/__support/common.h b/src/__support/common.h
index 53a63fc..17c155e 100644
--- a/src/__support/common.h
+++ b/src/__support/common.h
@@ -1,4 +1,4 @@
-//===-- Common internal contructs -----------------------------------------===//
+//===-- Common internal contructs -------------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
diff --git a/src/__support/endian.h b/src/__support/endian.h
index e1d52ca..5f977aa 100644
--- a/src/__support/endian.h
+++ b/src/__support/endian.h
@@ -1,4 +1,4 @@
-//===-- Endianness support ------------------------------------------------===//
+//===-- Endianness support --------------------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
diff --git a/src/__support/sanitizer.h b/src/__support/sanitizer.h
index 16fe6ec..e7ae05f 100644
--- a/src/__support/sanitizer.h
+++ b/src/__support/sanitizer.h
@@ -1,4 +1,4 @@
-//===-- Convenient sanitizer macros ---------------------------------------===//
+//===-- Convenient sanitizer macros -----------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.