[PATCH] D150117: Use LLVM-style include guard in regex_impl.h
Hans Wennborg via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 8 06:59:27 PDT 2023
hans created this revision.
hans added a reviewer: thakis.
Herald added a subscriber: hiraditya.
Herald added a project: All.
hans requested review of this revision.
Herald added a project: LLVM.
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.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D150117
Files:
llvm/lib/Support/regex_impl.h
Index: llvm/lib/Support/regex_impl.h
===================================================================
--- llvm/lib/Support/regex_impl.h
+++ 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 @@
}
#endif
-#endif /* !_REGEX_H_ */
+#endif /* !LLVM_SUPPORT_REGEX_IMPL_H */
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D150117.520355.patch
Type: text/x-patch
Size: 499 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230508/82b74e97/attachment.bin>
More information about the llvm-commits
mailing list