Fix crash in EmitDeclMetadata mode
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: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@252229 91177308-0d34-0410-b5e6-96231b3b80d8

apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang