[Lldb-commits] [PATCH] D132307: [lldb] Switch RegularExpression from llvm::Regex to std::regex
Jonas Devlieghere via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Sat Aug 20 13:08:36 PDT 2022
JDevlieghere added inline comments.
================
Comment at: lldb/include/lldb/Utility/RegularExpression.h:92
+ std::regex m_regex;
+ std::optional<std::regex_error> m_regex_error;
};
----------------
There's an ongoing discussion on the forums [1] to replace `llvm::Optional` with `std::optional`. Until that's resolved we should stick with llvm's variant for consistency.
[1] https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716/10
================
Comment at: lldb/source/Utility/CMakeLists.txt:29
+ PROPERTIES COMPILE_OPTIONS
+ "-fcxx-exceptions"
+)
----------------
kastiglione wrote:
> the `std::regex` constructor throws `std::regex_error` if the pattern is invalid. For this reason, exceptions are enabled for this one file.
What happens when exceptions are disabled? What does it mean to have this enabled for a single file? I don't know if it's part of the LLVM developer guide, but LLVM is supposed to build without RTTI and without exceptions.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D132307/new/
https://reviews.llvm.org/D132307
More information about the lldb-commits
mailing list