diff options
| author | MaulingMonkey <git@maulingmonkey.com> | 2020-06-24 23:28:00 -0700 |
|---|---|---|
| committer | MaulingMonkey <git@maulingmonkey.com> | 2020-06-24 23:28:00 -0700 |
| commit | 24a728a8eb4832568509eb757c2374934a76cb98 (patch) | |
| tree | 7776184d1e6de400172fce433da3d0bdcd8ee231 /src/rustllvm/RustWrapper.cpp | |
| parent | f8eb81ba4e85b02d90cfc33fcba0a6a7d5cbf810 (diff) | |
| download | rust-24a728a8eb4832568509eb757c2374934a76cb98.tar.gz rust-24a728a8eb4832568509eb757c2374934a76cb98.zip | |
debuginfo: Define int/float types in terms of MSVC-recognized types.
PDB debug information doesn't appear to be emitted for basic types. By defining u32 as a typedef for unsigned __int32 when targeting MSVC, we allow CDB and other debuggers to recognize "u32" as a type/expression. This in turn unblocks rust-lang#70052 "Update hashbrown to 0.8.0" by allowing $T1 ..= $T3 to resolve, which would otherwise fail to resolve when builtin types fail to parse.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
| -rw-r--r-- | src/rustllvm/RustWrapper.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/rustllvm/RustWrapper.cpp b/src/rustllvm/RustWrapper.cpp index cdb3a157eab..d78fb63fd4e 100644 --- a/src/rustllvm/RustWrapper.cpp +++ b/src/rustllvm/RustWrapper.cpp @@ -759,6 +759,14 @@ extern "C" LLVMMetadataRef LLVMRustDIBuilderCreateBasicType( return wrap(Builder->createBasicType(StringRef(Name, NameLen), SizeInBits, Encoding)); } +extern "C" LLVMMetadataRef LLVMRustDIBuilderCreateTypedef( + LLVMRustDIBuilderRef Builder, LLVMMetadataRef Type, const char *Name, size_t NameLen, + LLVMMetadataRef File, unsigned LineNo, LLVMMetadataRef Scope) { + return wrap(Builder->createTypedef( + unwrap<DIType>(Type), StringRef(Name, NameLen), unwrap<DIFile>(File), + LineNo, unwrap<DIScope>(Scope))); +} + extern "C" LLVMMetadataRef LLVMRustDIBuilderCreatePointerType( LLVMRustDIBuilderRef Builder, LLVMMetadataRef PointeeTy, uint64_t SizeInBits, uint32_t AlignInBits, unsigned AddressSpace, |
