commit | 6710cf1d5f3ab31524af6d72278ec5952f75b3c4 | [log] [tgz] |
---|---|---|
author | John McCall <rjmccall@apple.com> | Tue Nov 30 10:12:16 2010 +0000 |
committer | John McCall <rjmccall@apple.com> | Tue Nov 30 10:12:16 2010 +0000 |
tree | 363e86d007fd6ea8a4559d91c0c4a6678dabe933 | |
parent | 85fedbf188ed4e4ba03afc388127089f7a364354 [diff] |
Make the dumper safe against null declaration names. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120421 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/DumpXML.cpp b/lib/AST/DumpXML.cpp index ea9f1cc..5f1a396 100644 --- a/lib/AST/DumpXML.cpp +++ b/lib/AST/DumpXML.cpp
@@ -255,6 +255,9 @@ } void setName(DeclarationName Name) { + if (!Name) + return set("name", ""); + // Common case. if (Name.isIdentifier()) return set("name", Name.getAsIdentifierInfo()->getName());