[all-commits] [llvm/llvm-project] f9e2a6: [FileCheck] Add support for hex alternate form in ...

RoboTux via All-commits all-commits at lists.llvm.org
Fri Mar 12 10:14:28 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f9e2a62cc594c96194908a3ac4804caa07f86ba6
      https://github.com/llvm/llvm-project/commit/f9e2a62cc594c96194908a3ac4804caa07f86ba6
  Author: Thomas Preud'homme <thomasp at graphcore.ai>
  Date:   2021-03-12 (Fri, 12 Mar 2021)

  Changed paths:
    M llvm/docs/CommandGuide/FileCheck.rst
    M llvm/lib/FileCheck/FileCheck.cpp
    M llvm/lib/FileCheck/FileCheckImpl.h
    M llvm/test/FileCheck/numeric-expression.txt
    M llvm/unittests/FileCheck/FileCheckTest.cpp

  Log Message:
  -----------
  [FileCheck] Add support for hex alternate form in FileCheck

Add printf-style alternate form flag to prefix hex number with 0x when
present. This works on both empty numeric expression (e.g. variable
definition from input) and when matching a numeric expression. The
syntax is as follows:

[[#%#<precision specifier><format specifier>, ...]

where <precision specifier> and <format specifier> are optional and ...
can be a variable definition or not with an empty expression or not.

This feature was requested in https://reviews.llvm.org/D81144#2075532
for llvm/test/MC/ELF/gen-dwarf64.s

Reviewed By: jdenny

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




More information about the All-commits mailing list