From bfed654e98888b8bc18df544757f3113de1cd4bd Mon Sep 17 00:00:00 2001 From: Jakob Bornecrantz Date: Wed, 19 Jan 2022 08:48:28 -0800 Subject: [PATCH] [LLVM-C] Use NameLen in LLVMGetNamedGlobalAlias I tried to look over the file and didn't see any other non-use of *Len variables. Reviewed By: deadalnix Differential Revision: https://reviews.llvm.org/D116482 --- llvm/lib/IR/Core.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/IR/Core.cpp b/llvm/lib/IR/Core.cpp index 85271dd..9415e35 100644 --- a/llvm/lib/IR/Core.cpp +++ b/llvm/lib/IR/Core.cpp @@ -2293,7 +2293,7 @@ LLVMValueRef LLVMAddAlias2(LLVMModuleRef M, LLVMTypeRef ValueTy, LLVMValueRef LLVMGetNamedGlobalAlias(LLVMModuleRef M, const char *Name, size_t NameLen) { - return wrap(unwrap(M)->getNamedAlias(Name)); + return wrap(unwrap(M)->getNamedAlias(StringRef(Name, NameLen))); } LLVMValueRef LLVMGetFirstGlobalAlias(LLVMModuleRef M) { -- 2.7.4