[llvm] 8998f8a - [DebugInfo] Attempt to fix regression test failure after 59a76d957a2603ee0

Sourabh Singh Tomar via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 23 02:40:25 PDT 2020


Author: Sourabh Singh Tomar
Date: 2020-07-23T14:55:30+05:30
New Revision: 8998f8ab6630ef173cd1f57f0e57b4c16566db6f

URL: https://github.com/llvm/llvm-project/commit/8998f8ab6630ef173cd1f57f0e57b4c16566db6f
DIFF: https://github.com/llvm/llvm-project/commit/8998f8ab6630ef173cd1f57f0e57b4c16566db6f.diff

LOG: [DebugInfo] Attempt to fix regression test failure after 59a76d957a2603ee0

Test case `test/CodeGen/WebAssembly/stackified-debug.ll`
was failing due to malformed DwarfExpression.

This failure has been seen in lot of bots, for instance in:
http://lab.llvm.org:8011/builders/lld-x86_64-ubuntu-fast/builds/18794

: 'RUN: at line 1'
/home/buildbot/as-builder-4/lld-x86_64-ubuntu-fast/build/bin/llc
/home/buildbot/as-builder-4/lld-x86_64-ubuntu-fast/build/bin/FileCheck /home/buildbot/as-builder-4/lld-x86_64-ubuntu-fast/llvm-project/llvm/test/CodeGen/WebAssembly/stackified-debug.ll
home/buildbot/as-builder-4/lld-x86_64-ubuntu-fast/llvm-project/llvm/test/CodeGen/WebAssembly/stackified-debug.ll:26:10: error: CHECK: expected string not found in input
 CHECK: .int16 4 # Loc expr size
         ^
<stdin>:34:2: note: scanning from here
 .int16 3 # Loc expr size

Differential Revision: https://reviews.llvm.org/D83560

Added: 
    

Modified: 
    llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 32a974b45d7d..a705fa4eec34 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -2512,6 +2512,8 @@ void DwarfDebug::emitDebugLocValue(const AsmPrinter &AP, const DIBasicType *BT,
     // TODO TargetIndexLocation is a target-independent. Currently only the WebAssembly-specific
     // encoding is supported.
     DwarfExpr.addWasmLocation(Loc.Index, static_cast<uint64_t>(Loc.Offset));
+      DwarfExpr.addExpression(std::move(ExprCursor));
+      return;
   } else if (Value.isConstantFP()) {
     if (AP.getDwarfVersion() >= 4 && AP.getDwarfDebug()->tuneForGDB()) {
       DwarfExpr.addConstantFP(Value.getConstantFP()->getValueAPF());


        


More information about the llvm-commits mailing list