[PATCH] D56669: Remove NameLen argument from newly-introduced IR C APIs.
James Y Knight via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 14 09:17:48 PST 2019
jyknight updated this revision to Diff 181569.
jyknight added a comment.
(Ugh, forgot to cc llvm-commits)
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D56669/new/
https://reviews.llvm.org/D56669
Files:
llvm/include/llvm-c/Core.h
llvm/lib/IR/Core.cpp
Index: llvm/lib/IR/Core.cpp
===================================================================
--- llvm/lib/IR/Core.cpp
+++ llvm/lib/IR/Core.cpp
@@ -2533,9 +2533,8 @@
}
LLVMBasicBlockRef LLVMCreateBasicBlockInContext(LLVMContextRef C,
- const char *Name,
- size_t NameLen) {
- return wrap(llvm::BasicBlock::Create(*unwrap(C), StringRef(Name, NameLen)));
+ const char *Name) {
+ return wrap(llvm::BasicBlock::Create(*unwrap(C), Name));
}
LLVMBasicBlockRef LLVMAppendBasicBlockInContext(LLVMContextRef C,
@@ -3542,9 +3541,9 @@
LLVMValueRef LLVMBuildIntCast2(LLVMBuilderRef B, LLVMValueRef Val,
LLVMTypeRef DestTy, LLVMBool IsSigned,
- const char *Name, size_t NameLen) {
- return wrap(unwrap(B)->CreateIntCast(unwrap(Val), unwrap(DestTy),
- IsSigned, StringRef(Name, NameLen)));
+ const char *Name) {
+ return wrap(
+ unwrap(B)->CreateIntCast(unwrap(Val), unwrap(DestTy), IsSigned, Name));
}
LLVMValueRef LLVMBuildIntCast(LLVMBuilderRef B, LLVMValueRef Val,
Index: llvm/include/llvm-c/Core.h
===================================================================
--- llvm/include/llvm-c/Core.h
+++ llvm/include/llvm-c/Core.h
@@ -2812,8 +2812,7 @@
* @see llvm::BasicBlock::Create()
*/
LLVMBasicBlockRef LLVMCreateBasicBlockInContext(LLVMContextRef C,
- const char *Name,
- size_t NameLen);
+ const char *Name);
/**
* Append a basic block to the end of a function.
@@ -3644,7 +3643,7 @@
LLVMTypeRef DestTy, const char *Name);
LLVMValueRef LLVMBuildIntCast2(LLVMBuilderRef, LLVMValueRef Val,
LLVMTypeRef DestTy, LLVMBool IsSigned,
- const char *Name, size_t NameLen);
+ const char *Name);
LLVMValueRef LLVMBuildFPCast(LLVMBuilderRef, LLVMValueRef Val,
LLVMTypeRef DestTy, const char *Name);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56669.181569.patch
Type: text/x-patch
Size: 2291 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190114/96b40b2d/attachment.bin>
More information about the llvm-commits
mailing list