[PATCH] D50160: [c-index-test] Use correct executable path to discover resource directory.

Volodymyr Sapsai via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 1 16:18:39 PDT 2018


vsapsai marked an inline comment as done.
vsapsai added inline comments.


================
Comment at: clang/tools/c-index-test/core_main.cpp:210
+  void *P = (void*) (intptr_t) indextest_core_main;
+  std::string Executable = llvm::sys::fs::getMainExecutable(ProgName, P);
   SmallVector<const char *, 4> ArgsWithProgName;
----------------
akyrtzi wrote:
> Could you move this up to `indextest_core_main` and have `printSourceSymbols()` accept the executable path directly ?
> This would come in handy to avoid duplication if we later on add another function that also needs the executable path.
Done. Thanks for the suggestion, I think the code looks better now.


https://reviews.llvm.org/D50160





More information about the cfe-commits mailing list