[llvm] bfed654 - [LLVM-C] Use NameLen in LLVMGetNamedGlobalAlias
Arthur Eubanks via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 19 08:59:11 PST 2022
Author: Jakob Bornecrantz
Date: 2022-01-19T08:58:57-08:00
New Revision: bfed654e98888b8bc18df544757f3113de1cd4bd
URL: https://github.com/llvm/llvm-project/commit/bfed654e98888b8bc18df544757f3113de1cd4bd
DIFF: https://github.com/llvm/llvm-project/commit/bfed654e98888b8bc18df544757f3113de1cd4bd.diff
LOG: [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
Added:
Modified:
llvm/lib/IR/Core.cpp
Removed:
################################################################################
diff --git a/llvm/lib/IR/Core.cpp b/llvm/lib/IR/Core.cpp
index 85271ddd57f2a..9415e35a8f512 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) {
More information about the llvm-commits
mailing list