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)
commitddb8e06a8e5cf4964d1f87e51ba5541235dd6a48
treeb02926810f451272fa4d206e117771dcd9482c17
parenteb96e44aeae551fc6003f1c03b374ca5e1f69efe
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!

llvm-svn: 302915
clang/lib/CodeGen/CGDebugInfo.cpp
clang/lib/CodeGen/CGDebugInfo.h