Skip to content

Commit

Permalink
Use LLVM-style include guard in regex_impl.h
Browse files Browse the repository at this point in the history
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 2b8b90a, but renaming the
macro in line with LLVM's other include guards seems like a better fix.

Differential revision: https://reviews.llvm.org/D150117
  • Loading branch information
zmodem committed May 8, 2023
1 parent 62e6082 commit b86c249
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions llvm/lib/Support/regex_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 */

0 comments on commit b86c249

Please sign in to comment.