[PATCH] D107049: [clang-repl] Re-implement clang-interpreter as a test case.

Nico Weber via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 1 05:52:00 PDT 2021


thakis added a comment.

> I did not find a good way to 'find back' the clang resource-dir and it seems to be put in a constant place. The test needs to have a compiled and interpreted parts -- it throws an exception from the interpreter land and expects a compiled binary to be able to catch it. I am not sure if I know how to do that in lit.

Maybe this could be a binary with a main() function instead of a unit test, and you pass the path to the resource dir and to clang-interpreter to it, and then that sets up an exception handler and execs clang-interpreter? Or it could stay mostly as-is except make it a binary instead of a test, and call it from lit from a `.test` file (and pass in resource dir). That'd be more in line what other clang tests do.

(See e.g. the `%resource_dir` substitution, set in llvm/utils/lit/lit/llvm/config.py, used in a few places.)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D107049/new/

https://reviews.llvm.org/D107049



More information about the cfe-commits mailing list