summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR
diff options
context:
space:
mode:
authorRobert Widmann <devteam.codafi@gmail.com>2018-08-25 19:54:39 +0000
committerRobert Widmann <devteam.codafi@gmail.com>2018-08-25 19:54:39 +0000
commit106eab0292257a9e5c077726a58f8a9d29f02dc9 (patch)
treeef67394e5ed6ff5910e9d484a4edf8d096595e3e /llvm/lib/IR
parentebec2793d1768d655a4afab19420ab8efb9d8d89 (diff)
downloadbcm5719-llvm-106eab0292257a9e5c077726a58f8a9d29f02dc9.tar.gz
bcm5719-llvm-106eab0292257a9e5c077726a58f8a9d29f02dc9.zip
[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 llvm-svn: 340691
Diffstat (limited to 'llvm/lib/IR')
-rw-r--r--llvm/lib/IR/DebugInfo.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/IR/DebugInfo.cpp b/llvm/lib/IR/DebugInfo.cpp
index f1c0a01c5d0..003a48ca816 100644
--- a/llvm/lib/IR/DebugInfo.cpp
+++ b/llvm/lib/IR/DebugInfo.cpp
@@ -1330,7 +1330,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)));
}
OpenPOWER on IntegriCloud