]> granicus.if.org Git - clang/commit
Fix crash in EmitDeclMetadata mode
authorKeno Fischer <kfischer@college.harvard.edu>
Thu, 5 Nov 2015 23:18:44 +0000 (23:18 +0000)
committerKeno Fischer <kfischer@college.harvard.edu>
Thu, 5 Nov 2015 23:18:44 +0000 (23:18 +0000)
commit1bcaa31605893d2ede0dbde597a57f3ae5ce0e0d
tree30dbdb2cbb059bf1a94c1276ec889e8b4e5b25b5
parent74b286d891a5ae1b212b782a857f66c9a3d0fd87
Fix crash in EmitDeclMetadata mode

Summary: This fixes a bug that's easily encountered in LLDB
(https://llvm.org/bugs/show_bug.cgi?id=22875). The problem here is that we
mangle a name during debug info emission, but never actually emit the actual
Decl, so we run into problems in EmitDeclMetadata (which assumes such a Decl
exists). Fix that by just skipping metadata emissions for mangled names that
don't have associated Decls.

Reviewers: rjmccall

Subscribers: labath, cfe-commits

Differential Revision: http://reviews.llvm.org/D13959

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