[llvm] 51d93e7 - [ADT] Fix implicit reliance on cassert in StringTable.h (#169324)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 24 12:47:47 PST 2025
Author: Danila Malyutin
Date: 2025-11-25T00:47:43+04:00
New Revision: 51d93e73975e5fc70008c286aaae2216fde097b6
URL: https://github.com/llvm/llvm-project/commit/51d93e73975e5fc70008c286aaae2216fde097b6
DIFF: https://github.com/llvm/llvm-project/commit/51d93e73975e5fc70008c286aaae2216fde097b6.diff
LOG: [ADT] Fix implicit reliance on cassert in StringTable.h (#169324)
Adds an explicit include of `<cassert>` in StringTable.h rather than
relying on the one in StringRef.h. Fixes potential compile errors if
assert() was undef'ed between StringRef.h and StringTable.h inclusion.
Added:
Modified:
llvm/include/llvm/ADT/StringTable.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/ADT/StringTable.h b/llvm/include/llvm/ADT/StringTable.h
index 9422a6da1ce8e..3a08e56e8f501 100644
--- a/llvm/include/llvm/ADT/StringTable.h
+++ b/llvm/include/llvm/ADT/StringTable.h
@@ -11,6 +11,7 @@
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/iterator.h"
+#include <cassert>
#include <iterator>
#include <limits>
More information about the llvm-commits
mailing list