From d853ea3142fd0c829e36738e097bb3d302b2a244 Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Mon, 29 Jul 2013 23:53:05 +0000 Subject: Make sure we don't emit an ODR hash for types with no name and make sure the comments for each testcase are a bit easier to distinguish. llvm-svn: 187392 --- llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp') diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 33d18db034d..87354426fb4 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -1104,10 +1104,12 @@ void DwarfDebug::finalizeModuleInfo() { for (unsigned i = 0, e = TypeUnits.size(); i != e; ++i) { MD5 Hash; DIE *Die = TypeUnits[i]; - // If we've requested ODR hashes, the current language is C++, and the type - // isn't located inside a C++ anonymous namespace then add the attribute now. + // If we've requested ODR hashes, the current language is C++, the type is + // named, and the type isn't located inside a C++ anonymous namespace then + // add the ODR signature attribute now. if (GenerateODRHash && CUMap.begin()->second->getLanguage() == dwarf::DW_LANG_C_plus_plus && + (getDIEStringAttr(Die, dwarf::DW_AT_name) != "") && !isContainedInAnonNamespace(Die)) addDIEODRSignature(Hash, CUMap.begin()->second, Die); } -- cgit v1.2.3