Skip to content
Commit 32a5482e authored by NAKAMURA Takumi's avatar NAKAMURA Takumi
Browse files

TableGen: Let getAllDerivedDefinitions() numeric order.

Since `RK::Recs` is sorted by character order, anonymous defs will be
enumerated like this;

  - anonymous_0
  - anonymous_1
  - anonymous_10
  - anonymous_100
  - anonymous_1000
  - ...
  - anonymous_99
  - anonymous_990
  - ...
  - anonymous_999

Some records around each gap might be wrapped around along increase or
decrease of records in middle. Then output order of anonymous defs
might be changed.

Numeric sort is expected to prevent such wrap-arounds.
This can be implemented with `StringRef::compare_numeric()`.

  - ...
  - anonymous_99
  - anonymous_100
  - ...
  - anonymous_999
  - anonymous_1000
  - ...

See also discussions in D145874.

Differential Revision: https://reviews.llvm.org/D145874
parent 7edff3c1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment