[llvm] b86c249 - Use LLVM-style include guard in regex_impl.h
Hans Wennborg via llvm-commits
llvm-commits at lists.llvm.org
Mon May 8 09:56:18 PDT 2023
Author: Hans Wennborg
Date: 2023-05-08T18:56:09+02:00
New Revision: b86c249691a7973a451bc6a586b39da64778d219
URL: https://github.com/llvm/llvm-project/commit/b86c249691a7973a451bc6a586b39da64778d219
DIFF: https://github.com/llvm/llvm-project/commit/b86c249691a7973a451bc6a586b39da64778d219.diff
LOG: Use LLVM-style include guard in regex_impl.h
The previous include guard (_REGEX_H_) is also used in a macOS SDK
header (xlocale.h), causing potential for trouble. This was previously
addressed in 2b8b90a7686858b1d22cae6fcfbd0904135112aa, but renaming the
macro in line with LLVM's other include guards seems like a better fix.
Differential revision: https://reviews.llvm.org/D150117
Added:
Modified:
llvm/lib/Support/regex_impl.h
Removed:
################################################################################
diff --git a/llvm/lib/Support/regex_impl.h b/llvm/lib/Support/regex_impl.h
index 8ddac7dcf9982..8f0c532205edc 100644
--- a/llvm/lib/Support/regex_impl.h
+++ b/llvm/lib/Support/regex_impl.h
@@ -35,8 +35,8 @@
* @(#)regex.h 8.1 (Berkeley) 6/2/93
*/
-#ifndef _REGEX_H_
-#define _REGEX_H_
+#ifndef LLVM_SUPPORT_REGEX_IMPL_H
+#define LLVM_SUPPORT_REGEX_IMPL_H
#include <sys/types.h>
typedef off_t llvm_regoff_t;
@@ -105,4 +105,4 @@ size_t llvm_strlcpy(char *dst, const char *src, size_t siz);
}
#endif
-#endif /* !_REGEX_H_ */
+#endif /* LLVM_SUPPORT_REGEX_IMPL_H */
More information about the llvm-commits
mailing list