summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DIEHash.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DIEHash.cpp b/llvm/lib/CodeGen/AsmPrinter/DIEHash.cpp
index c56d2e64730..abc504c0581 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DIEHash.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DIEHash.cpp
@@ -383,6 +383,9 @@ void DIEHash::computeHash(DIE *Die) {
E = Die->getChildren().end();
I != E; ++I)
computeHash(*I);
+
+ // Following the last (or if there are no children), append a zero byte.
+ Hash.update((uint8_t)0);
}
/// This is based on the type signature computation given in section 7.27 of the
OpenPOWER on IntegriCloud