]> granicus.if.org Git - clang/commit
Simplify DINamespace caching in CGDebugInfo
authorAdrian Prantl <aprantl@apple.com>
Fri, 12 May 2017 16:23:53 +0000 (16:23 +0000)
committerAdrian Prantl <aprantl@apple.com>
Fri, 12 May 2017 16:23:53 +0000 (16:23 +0000)
commit1635c9f0a045570754fadc744ee7aa16fd482158
tree4e39c66ccf91e5bb67b994778cd668091974dc70
parente92a9a577b6e0fdc1490d6580c013d3fdb5eed13
Simplify DINamespace caching in CGDebugInfo

This addresses review feedback from r302840.

By not canonicalizing namespace decls and using lexical decl context
instead of lookuing up the semantic decl context we can take advantage
of the fact that DINamespaces a reuniqued. This way non-module debug
info is unchanged and module debug info still gets distinct namespace
declarations when they ocur in different modules.

Thanks to Richard Smith for pointing this out!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@302915 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGDebugInfo.cpp
lib/CodeGen/CGDebugInfo.h