[clang] [llvm] Trying to fix undefined symbol error caused by iterator variable (PR #141507)

via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 18 08:31:20 PDT 2025


ShashwathiNavada wrote:

> We need to call HandleTopLevelDecl for every translation-unit-level variable we create. ActOnOMPIteratorExpr creates a translation-unit-level variable for every top-level iterator expression. But we're only calling HandleTopLevelDecl for some of them: specifically, the ones where getDeclareMapperVarRef() is true. What happens to the other ones?

I see your point. I noticed that `ActOnOMPIteratorExpr` gets called for affinity, depend, and map clauses. Out of these, only map seems to appear at global scope. That probably explains why we don’t call HandleTopLevelDecl here. How do you think we should proceed from here?

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


More information about the llvm-commits mailing list