[llvm] [ADT] Fix implicit reliance on cassert in StringTable.h (PR #169324)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 24 04:55:11 PST 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-adt
Author: Danila Malyutin (danilaml)
<details>
<summary>Changes</summary>
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.
Noticed the issue after c9f573463ebd7b4e46da4877802f2364f700e54a.
---
Full diff: https://github.com/llvm/llvm-project/pull/169324.diff
1 Files Affected:
- (modified) llvm/include/llvm/ADT/StringTable.h (+1)
``````````diff
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>
``````````
</details>
https://github.com/llvm/llvm-project/pull/169324
More information about the llvm-commits
mailing list