[PATCH] D116482: [LLVM-C] Use NameLen in LLVMGetNamedGlobalAlias

Arthur Eubanks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 19 08:59:23 PST 2022


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGbfed654e9888: [LLVM-C] Use NameLen in LLVMGetNamedGlobalAlias (authored by Wallbraker, committed by aeubanks).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D116482/new/

https://reviews.llvm.org/D116482

Files:
  llvm/lib/IR/Core.cpp


Index: llvm/lib/IR/Core.cpp
===================================================================
--- llvm/lib/IR/Core.cpp
+++ llvm/lib/IR/Core.cpp
@@ -2293,7 +2293,7 @@
 
 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) {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D116482.401272.patch
Type: text/x-patch
Size: 477 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220119/9875f5ed/attachment.bin>


More information about the llvm-commits mailing list