[PATCH] D70062: MCObjectStreamer: assign MCSymbols in the dummy fragment to offset 0.

James Y Knight via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 11 11:53:36 PST 2019


jyknight marked 3 inline comments as done.
jyknight added inline comments.


================
Comment at: llvm/test/MC/AsmParser/assembler-expressions.s:36
 text1:
+# ASM-ERR: [[@LINE+1]]:5: error: expected absolute expression
+.if . - text1 == 0
----------------
jcai19 wrote:
> nickdesaulniers wrote:
> > This is testing that an error is emitted? Don't we want to test that an error is *not* emitted?
> I got a feeling this test case has something to do with my patch at https://reviews.llvm.org/D69411 :). I accidentally removed a nop instruction in the test case used to reproduce the issue in the said patch. Will update my test case. Thanks @jyknight for catching it.
No, that error is emitted when attempting to write textual assembly output (the first RUN line in the test), from parsing the textual input. In that case, we cannot evaluate differences between symbols, since we don't track any instruction sizes or anything, but that is OK -- it's irrelevant in real-world use-cases.

The other two RUN lines, where we emit an object file, succeed.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D70062/new/

https://reviews.llvm.org/D70062





More information about the llvm-commits mailing list