summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2018-08-27 08:41:29 +0000
committerHans Wennborg <hans@hanshq.net>2018-08-27 08:41:29 +0000
commit4a4bff54966e7902629a66835292356064322de6 (patch)
tree0a821a63526514fea46746da8234e1f949c5b9d6
parent9df0977d9409b093156ebbd8e1ac99bc32b9eb39 (diff)
Merging r340691:
------------------------------------------------------------------------ r340691 | codafi | 2018-08-25 21:54:39 +0200 (Sat, 25 Aug 2018) | 11 lines [C-API][DIBuilder] Use NameLen in LLVMDIBuilderCreateParameterVariable Summary: 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. Reviewers: whitequark, CodaFi Reviewed By: CodaFi Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D51141 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_70@340724 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/IR/DebugInfo.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/IR/DebugInfo.cpp b/lib/IR/DebugInfo.cpp
index 77585ee30cd..165c881c13e 100644
--- a/lib/IR/DebugInfo.cpp
+++ b/lib/IR/DebugInfo.cpp
@@ -1329,7 +1329,7 @@ LLVMMetadataRef LLVMDIBuilderCreateParameterVariable(
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)));
}