summaryrefslogtreecommitdiff
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2013-07-29 23:53:05 +0000
committerEric Christopher <echristo@gmail.com>2013-07-29 23:53:05 +0000
commit944aa2b784c727f5d4dca1a1a5347af8519ae6f2 (patch)
tree2726fb29c405bb4be2565870ed6396c37cd53a87 /lib/CodeGen
parent407ec1422a3446ed17a09dfb94695804fafdc09d (diff)
downloadllvm-944aa2b784c727f5d4dca1a1a5347af8519ae6f2.tar.gz
llvm-944aa2b784c727f5d4dca1a1a5347af8519ae6f2.tar.bz2
llvm-944aa2b784c727f5d4dca1a1a5347af8519ae6f2.tar.xz
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187392 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfDebug.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 33d18db034..87354426fb 100644
--- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/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);
}