[PATCH] D150127: Undo include order work-around in Regex.cpp
Hans Wennborg via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 8 10:20:40 PDT 2023
hans created this revision.
hans added reviewers: JDevlieghere, thakis.
Herald added a subscriber: hiraditya.
Herald added a project: All.
hans requested review of this revision.
Herald added a project: LLVM.
r327256 / 2b8b90a7686858b1d22cae6fcfbd0904135112aa added this
include-order work-around since regex_impl.h's include guard conflicted
with macOS's xlocale.h which used the same macro.
Since b86c249691a7973a451bc6a586b39da64778d219 <https://reviews.llvm.org/rGb86c249691a7973a451bc6a586b39da64778d219> renamed the include
guard, that work-around is no longer needed.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D150127
Files:
llvm/lib/Support/Regex.cpp
Index: llvm/lib/Support/Regex.cpp
===================================================================
--- llvm/lib/Support/Regex.cpp
+++ llvm/lib/Support/Regex.cpp
@@ -14,14 +14,11 @@
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/Twine.h"
+#include "regex_impl.h"
+
#include <cassert>
#include <string>
-// Important this comes last because it defines "_REGEX_H_". At least on
-// Darwin, if included before any header that (transitively) includes
-// xlocale.h, this will cause trouble, because of missing regex-related types.
-#include "regex_impl.h"
-
using namespace llvm;
Regex::Regex() : preg(nullptr), error(REG_BADPAT) {}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D150127.520432.patch
Type: text/x-patch
Size: 680 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230508/14a91d70/attachment.bin>
More information about the llvm-commits
mailing list