llvm: update ffi bindings for split dwarf
This commit modifies the FFI bindings to LLVM required for Split DWARF support in rustc. In particular: - `addPassesToEmitFile`'s wrapper, `LLVMRustWriteOutputFile` now takes a `DwoPath` `const char*`. When disabled, `nullptr` should be provided which will preserve existing behaviour. When enabled, the path to the `.dwo` file should be provided. - `createCompileUnit`'s wrapper, `LLVMRustDIBuilderCreateCompileUnit` now has two additional arguments, for the `DWOId` and to enable `SplitDebugInlining`. `DWOId` should always be zero. - `createTargetMachine`'s wrapper, `LLVMRustCreateTargetMachine` has an additional argument which should be provided the path to the `.dwo` when enabled. Signed-off-by: David Wood <david@davidtw.co>
This commit is contained in:
parent
ddbc6176de
commit
341aa97adb
5 changed files with 41 additions and 7 deletions
|
@ -690,13 +690,14 @@ extern "C" LLVMMetadataRef LLVMRustDIBuilderCreateCompileUnit(
|
|||
const char *Producer, size_t ProducerLen, bool isOptimized,
|
||||
const char *Flags, unsigned RuntimeVer,
|
||||
const char *SplitName, size_t SplitNameLen,
|
||||
LLVMRustDebugEmissionKind Kind) {
|
||||
LLVMRustDebugEmissionKind Kind,
|
||||
uint64_t DWOId, bool SplitDebugInlining) {
|
||||
auto *File = unwrapDI<DIFile>(FileRef);
|
||||
|
||||
return wrap(Builder->createCompileUnit(Lang, File, StringRef(Producer, ProducerLen),
|
||||
isOptimized, Flags, RuntimeVer,
|
||||
StringRef(SplitName, SplitNameLen),
|
||||
fromRust(Kind)));
|
||||
fromRust(Kind), DWOId, SplitDebugInlining));
|
||||
}
|
||||
|
||||
extern "C" LLVMMetadataRef LLVMRustDIBuilderCreateFile(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue