[PATCH] D51141: [C-API][DIBuilder] Use NameLen in LLVMDIBuilderCreateParameterVariable
Jakob Bornecrantz via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 22 16:31:25 PDT 2018
Wallbraker created this revision.
Wallbraker added reviewers: whitequark, CodaFi.
Herald added a subscriber: llvm-commits.
NameLen wasn't being used and caused the parameters in gdb to very long, in my case, crashes in others. Please also perform the correct magical incarnations to have this be applied to the LLVM 7 branch.
Repository:
rL LLVM
https://reviews.llvm.org/D51141
Files:
lib/IR/DebugInfo.cpp
Index: lib/IR/DebugInfo.cpp
===================================================================
--- lib/IR/DebugInfo.cpp
+++ lib/IR/DebugInfo.cpp
@@ -1331,7 +1331,7 @@
size_t NameLen, unsigned ArgNo, LLVMMetadataRef File, unsigned LineNo,
LLVMMetadataRef Ty, LLVMBool AlwaysPreserve, LLVMDIFlags Flags) {
return wrap(unwrap(Builder)->createParameterVariable(
- unwrap<DIScope>(Scope), Name, ArgNo, unwrap<DIFile>(File),
+ unwrap<DIScope>(Scope), {Name, NameLen}, ArgNo, unwrap<DIFile>(File),
LineNo, unwrap<DIType>(Ty), AlwaysPreserve,
map_from_llvmDIFlags(Flags)));
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51141.162102.patch
Type: text/x-patch
Size: 655 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180822/9daab9de/attachment.bin>
More information about the llvm-commits
mailing list