Open andre2007 opened 4 years ago
Ah. I never noticed it before because I only ever used dmd on the result and ldc is a bit more of a stickler wrt duplicate symbols. A workaround for now is to use dmd instead.
For some reason libclang is returning "stat64" as the mangling for "stat" even though, as C linkage functions, they don't mangle!
I'm racking my head how to solve this without having to try and reduce the issue with libclang. There's no good way to know if the cursor is C or C++ (thereby avoiding any mangling whatsoever if not needed, as is the case here). There's a function to get the language, but it returns "C" for any and all functions regardless of them being extern "C"
or not. There's a function to get linkage, but it doesn't do what you'd expect and basically tells you if a cursor is extern or not.
cling can do a lot of things that libclang cannot. one of those things might be wrap the parts of clang + associated related code not in libclang.
-- Laeeth Isharc laeeth@laeeth.com
On Wed, 26 Aug 2020, at 3:50 PM, Atila Neves wrote:
I'm racking my head how to solve this without having to try and reduce the issue with libclang. There's no good way to know if the cursor is C or C++ (thereby avoiding any mangling whatsoever if not needed, as is the case here). There's a function to get the language, but it returns "C" for any and all functions regardless of them being
extern "C"
or not. There's a function to get linkage, but it doesn't do what you'd expect and basically tells you if a cursor is extern or not.— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/atilaneves/dpp/issues/271#issuecomment-680928845, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABSV67TNIK3CHGEHU4IUIXTSCUOL7ANCNFSM4P53FUHQ.
If my understanding is correct, with this pr it will be a deprecation warning also with DMD https://github.com/dlang/dmd/pull/8429
This dockerfile
will produce a file
pythonh.d
which contains this codingLDC2 complains: