[PATCH] D78169: [lit] Keep original cfg file case around.

Nico Weber via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 14 16:54:01 PDT 2020


thakis created this revision.
thakis added a reviewer: hans.
Herald added subscribers: delcypher, mgorny.

There's been some back and forth if the cfg paths in the
config_map should be normcase()d. The argument for is that
it allows using all-lower spelling in cmd on Windows, the
argument against that doing so is lossy. (See r313918.)

Before the relative-paths-in-generated-lit.site.cfg.py work,
there was no downside to calling normcase(), but with it
we need a hack to recover the original case.

This time, normcase() the hashtable key, but store the original
cased key in addition to the value. This fixes both cons, at the
cost of a few bytes more memory.


https://reviews.llvm.org/D78169

Files:
  llvm/cmake/modules/AddLLVM.cmake
  llvm/utils/lit/lit/discovery.py
  llvm/utils/lit/lit/formats/googletest.py
  llvm/utils/lit/lit/llvm/config.py
  llvm/utils/lit/lit/util.py
  llvm/utils/lit/tests/Inputs/config-map-discovery/driver.py
  llvm/utils/llvm-lit/llvm-lit.in

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78169.257558.patch
Type: text/x-patch
Size: 5042 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200414/355fc410/attachment.bin>


More information about the llvm-commits mailing list