[PATCH] D7895: Anonymous namespaces are missing import DW_TAG_imported_module.

Robinson, Paul via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 18 16:40:11 PDT 2015


How is this goal (adding imported modules for anonymous namespaces) consistent with the lack of imported modules for outer namespaces in nested ones? These two scenarios seem quite the same to me.

Sadly, the "lack of imported modules for outer namespaces in nested ones" is nothing more than the normal way scoping works everywhere (with two minor exceptions).  Therefore the scenarios are far from the same.  Searching upward from the current scope through the parents to the top is implicit and will remain so.  Even COBOL does that; it just doesn't make _all_ names visible to the inner scope.

For COBOL, I deliberately pretended the funky rules didn't exist. As far as DWARF is concerned, COBOL scoping works exactly like everything else.
For C++, adding explicit imports for anonymous namespaces means as far as DWARF is concerned, C++ scoping work exactly like everything else.

That is: What I want will make all languages behave simply and consistently, for DWARF scoping purposes.
Is that such an undesirable result?

Still haven't heard anybody say what would *break* if we have explicit imports.
--paulr

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150818/58b64c31/attachment.html>


More information about the llvm-commits mailing list