[PATCH] D59571: [Remarks] Emit a section containing remark diagnostics metadata

Matthew Voss via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 20 11:36:09 PDT 2019


ormris added inline comments.


================
Comment at: llvm/test/CodeGen/X86/remarks-section.ll:2
+; RUN: llc < %s -mtriple=x86_64-linux -remarks-section -pass-remarks-output=/dev/null | FileCheck %s
+; RUN: llc < %s -mtriple=x86_64-darwin -remarks-section -pass-remarks-output=/dev/null  | FileCheck --check-prefix=CHECK-DARWIN %s
+
----------------
ormris wrote:
> thegameg wrote:
> > ormris wrote:
> > > Quick drive-by nit: I noticed that this uses "/dev/null".  This will cause failures on the Windows bots, since Windows doesn't provide that file.
> > Thanks for the heads-up. What would be the solution to this? Is this any different from all the other tests using `-o /dev/null` or `> /dev/null`?
> Yes, since you're checking for the final path. Lit will replace the string "/dev/null" with a temporary file.  You could use a RUN line like this:
> 
> ```
> ; RUN: llc < %s -mtriple=x86_64-linux -remarks-section -pass-remarks-output=%/t.yaml | FileCheck -DPATH=%/t.yaml %s
> ```
> 
> That will store the path of the remarks file in the Filecheck variable "PATH", which you can refer to in your CHECK lines as "[[PATH]]". The "%/t" variable is also really handy. It makes sure that the path will always use forward slashes, removing backslash weirdness.
LG!


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

https://reviews.llvm.org/D59571





More information about the llvm-commits mailing list