[llvm] [llvm][ADT] Refactor PointerUnion to use PunnedPointer. NFC. (PR #187950)

Martin Storsjö via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 24 03:15:04 PDT 2026


mstorsjo wrote:

Thanks for the revert!

For a way to reproduce it; I mainly run into this in relation to precompiled headers and C++ modules.

One way of reproducing, is with the following input, as `dummy.cppm`:
```c++
module;
```
Compiling it like this:
```console
$ clang -target x86_64-linux-gnu -std=gnu++23 -x c++-module -fmodule-output=std.pcm -o std.cppm.obj -c dummy.cppm
clang: ../../clang/include/clang/AST/ASTContext.h:1271: clang::TranslationUnitDe
cl* clang::ASTContext::getTranslationUnitDecl() const: Assertion `TUDecl->getMostRecentDecl() == TUDecl && "The active TU is not current one!"' failed.
```

https://github.com/llvm/llvm-project/pull/187950


More information about the llvm-commits mailing list