[PATCH] D124815: [libclang] Fall back to getMainExecutable when dladdr fails
Fangrui Song via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon May 9 23:49:12 PDT 2022
MaskRay added a comment.
I think the file is linked into `libclang.so`.
The resource directory is relative to`libclang.so` but may not be relative to the main executable... So getMainExecutable will be incorrect.
================
Comment at: clang/tools/libclang/CIndexer.cpp:142
+ // error instead of crashing.
+ llvm::report_fatal_error("Could not locate Clang resource path");
+ }
----------------
Diagnostics generally are not capitalized: https://llvm.org/docs/CodingStandards.html#error-and-warning-messages
You can ignore the numerous anti-examples (I know, lots of inconsistency)...
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D124815/new/
https://reviews.llvm.org/D124815
More information about the cfe-commits
mailing list