[all-commits] [llvm/llvm-project] a09f09: [TableGen] Fix incorrect handling of nested `#ifnd...

Min-Yih Hsu via All-commits all-commits at lists.llvm.org
Thu Sep 7 12:58:07 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a09f09c618e9ec9ba8455ffa7f9765b240f0d16d
      https://github.com/llvm/llvm-project/commit/a09f09c618e9ec9ba8455ffa7f9765b240f0d16d
  Author: Min-Yih Hsu <min at myhsu.dev>
  Date:   2023-09-07 (Thu, 07 Sep 2023)

  Changed paths:
    M llvm/lib/TableGen/TGLexer.cpp
    A llvm/test/TableGen/nested_ifdef.inc
    A llvm/test/TableGen/nested_ifdef2.inc
    A llvm/test/TableGen/nested_ifdef_main.td

  Log Message:
  -----------
  [TableGen] Fix incorrect handling of nested `#ifndef` directives

TableGen's lexer was unable to handle nested #ifndef when the outer
`#ifdef` / `#ifndef` scope is subject to skip. This was caused by returning
the canonicalized token when it should have returned the original one.

Fix #65100.

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




More information about the All-commits mailing list