aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorAlex Richardson <Alexander.Richardson@cl.cam.ac.uk>2020-10-19 16:21:10 +0100
committerAlex Richardson <Alexander.Richardson@cl.cam.ac.uk>2020-10-19 16:21:34 +0100
commit9a6ae91128fa53b427f2da9765f042faed5533a6 (patch)
tree3e82c2325eb2472022aedabac387c1a18fa36621 /clang/lib/Frontend/CompilerInvocation.cpp
parent482e6f0041a81967ddf06b5e52375fbb592cfe7f (diff)
downloadllvm-9a6ae91128fa53b427f2da9765f042faed5533a6.zip
llvm-9a6ae91128fa53b427f2da9765f042faed5533a6.tar.gz
llvm-9a6ae91128fa53b427f2da9765f042faed5533a6.tar.bz2
[lit] Avoid calling realpath() for every printed message
I did some profiling of lit while trying to optimize the libc++ test startup for remote hosts and it turns out that there is a realpath() call for every message printed and this shows up in the profile. The inspect.getframeinfo() function calls realpath() internally and moreover we don't need most of the other information returned from it. This patch uses inspect.getsourcefile() and os.path.abspath() to remove ../ from the path instead. Not resolving symlinks reduces the startup time for running a single test with lit by about 50ms for me. Reviewed By: ldionne, yln Differential Revision: https://reviews.llvm.org/D89186
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions