[llvm] 9d7eb60 - Undo include order work-around in Regex.cpp
Hans Wennborg via llvm-commits
llvm-commits at lists.llvm.org
Tue May 9 00:20:01 PDT 2023
Author: Hans Wennborg
Date: 2023-05-09T09:18:10+02:00
New Revision: 9d7eb6008716eec7434e6ae07a804b5f2f39a575
URL: https://github.com/llvm/llvm-project/commit/9d7eb6008716eec7434e6ae07a804b5f2f39a575
DIFF: https://github.com/llvm/llvm-project/commit/9d7eb6008716eec7434e6ae07a804b5f2f39a575.diff
LOG: Undo include order work-around in Regex.cpp
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 renamed the include
guard, that work-around is no longer needed.
Differential revision: https://reviews.llvm.org/D150127
Added:
Modified:
llvm/lib/Support/Regex.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Support/Regex.cpp b/llvm/lib/Support/Regex.cpp
index 7a804a1a2297..dfbd373e4a98 100644
--- a/llvm/lib/Support/Regex.cpp
+++ b/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) {}
More information about the llvm-commits
mailing list