[lit] Keep original cfg file case around.
authorNico Weber <thakis@chromium.org>
Tue, 14 Apr 2020 00:12:51 +0000 (20:12 -0400)
committerNico Weber <thakis@chromium.org>
Wed, 15 Apr 2020 18:18:11 +0000 (14:18 -0400)
commitbc3f54de1827e58655c34477d09211cbc42589bd
tree3dac9300c1a0d5a02ca1825d246b18fdd53c9e93
parent591be7ec500c151d9232366042e21c74e006292c
[lit] Keep original cfg file case around.

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.

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.

Differential Revision: https://reviews.llvm.org/D78169
llvm/cmake/modules/AddLLVM.cmake
llvm/utils/lit/lit/discovery.py
llvm/utils/lit/lit/llvm/config.py
llvm/utils/lit/tests/Inputs/config-map-discovery/driver.py
llvm/utils/llvm-lit/llvm-lit.in