[fpc-devel] Wrong debug info when using clang backend
Jonas Maebe
jonas at freepascal.org
Fri Dec 8 19:02:11 CET 2023
On 08/12/2023 04:23, Adriaan van Os via fpc-devel wrote:
> Jonas Maebe via fpc-devel wrote:
>>> Because of this reason, FPC only uses llvm.dbg.addr. But clang still
>>> uses llvm.dbg.declare, and when I change FPC to use that one, the
>>> debug info for the variables in your test program is correct. So I'll
>>> change FPC to also use llvm.dbg.declare.
>>
>> Done.
>
> Just out of curiosity: Clang is by fpc used as a driver program, as it
> is asier to call it than tools like llc, opt and llvm-linker ?
It's indeed easier, and it also supports some preprocessing that llc
doesn't (I don't remember what exactly llc didn't support, perhaps
comments). It's also faster since you call one tool rather than 2 or 3.
Jonas
More information about the fpc-devel
mailing list