Skip to content
This repository was archived by the owner on Mar 28, 2020. It is now read-only.

Commit 0c8f940

Browse files
zhuoweiMaxDesiatov
authored andcommitted
WebAssembly: add logging when I get a BinaryExpr
I actually do need to know what's breaking.
1 parent e5a7798 commit 0c8f940

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/MC/WasmObjectWriter.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -496,6 +496,10 @@ void WasmObjectWriter::recordRelocation(MCAssembler &Asm,
496496
const auto *Inner = dyn_cast<MCSymbolRefExpr>(Expr);
497497
if (Inner && Inner->getKind() == MCSymbolRefExpr::VK_WEAKREF)
498498
llvm_unreachable("weakref used in reloc not yet implemented");
499+
if (!Inner) {
500+
fprintf(stderr, "weak check failed to get an inner:\n");
501+
Expr->dump();
502+
}
499503
}
500504

501505
// Put any constant offset in an addend. Offsets can be negative, and

0 commit comments

Comments
 (0)