[clang] [Clang] Support libstdc++ workarounds when using `-E` (PR #210802)
Corentin Jabot via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 27 07:53:41 PDT 2026
================
@@ -1018,9 +1018,16 @@ std::optional<uint64_t> Preprocessor::getStdLibCxxVersion() {
return std::nullopt;
}
+void Preprocessor::setStdLibCxxVersion(std::uint64_t Version) {
+ CXXStandardLibraryVersion = {
+ CXXStandardLibraryVersionInfo::LibStdCXX,
+ Version,
+ };
+}
+
bool Preprocessor::NeedsStdLibCxxWorkaroundBefore(uint64_t FixedVersion) {
assert(FixedVersion >= 2000'00'00 && FixedVersion <= 2100'00'00 &&
- "invalid value for __GLIBCXX__");
+ "invalid libstdc++ version number");
----------------
cor3ntin wrote:
Please revert that
https://github.com/llvm/llvm-project/pull/210802
More information about the cfe-commits
mailing list