[llvm] r367619 - [WebAssembly] Fixed relocation errors having no location.
Wouter van Oortmerssen via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 1 14:34:54 PDT 2019
Author: aardappel
Date: Thu Aug 1 14:34:54 2019
New Revision: 367619
URL: http://llvm.org/viewvc/llvm-project?rev=367619&view=rev
Log:
[WebAssembly] Fixed relocation errors having no location.
Summary:
Fixes: https://bugs.llvm.org/show_bug.cgi?id=42441
Used to print:
<unknown>:0: error: Cannot represent a difference across sections
(the location was null).
Now prints:
err.s:20:3: error: Cannot represent a difference across sections
i32.const foo-bar
^
Note: I looked at adding a test for this, but I don't think it is
worth it. We're not testing error formatting in the Wasm backend :)
Reviewers: sbc100, jgravelle-google
Subscribers: dschuff, aheejin, sunfish, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D65602
Modified:
llvm/trunk/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmParser.cpp
Modified: llvm/trunk/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmParser.cpp?rev=367619&r1=367618&r2=367619&view=diff
==============================================================================
--- llvm/trunk/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmParser.cpp (original)
+++ llvm/trunk/lib/Target/WebAssembly/AsmParser/WebAssemblyAsmParser.cpp Thu Aug 1 14:34:54 2019
@@ -763,6 +763,7 @@ public:
uint64_t &ErrorInfo,
bool MatchingInlineAsm) override {
MCInst Inst;
+ Inst.setLoc(IDLoc);
unsigned MatchResult =
MatchInstructionImpl(Operands, Inst, ErrorInfo, MatchingInlineAsm);
switch (MatchResult) {
More information about the llvm-commits
mailing list