summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/Core.cpp
diff options
context:
space:
mode:
authorJames Y Knight <jyknight@google.com>2019-01-14 17:16:55 +0000
committerJames Y Knight <jyknight@google.com>2019-01-14 17:16:55 +0000
commit68729f94ee8383921ef638a300009a88138dc30f (patch)
tree97e67db521b2aa64d4dde1e7a8b04db2fdd8a0ea /llvm/lib/IR/Core.cpp
parent32ef52063c207054911a9e0435cc85330faf2ee3 (diff)
downloadbcm5719-llvm-68729f94ee8383921ef638a300009a88138dc30f.tar.gz
bcm5719-llvm-68729f94ee8383921ef638a300009a88138dc30f.zip
Remove NameLen argument from newly-introduced IR C APIs.
Normally, changing the function signatures of C APIs is disallowed, but as these two are brand new last week, and haven't been released yet, it is okay in this instance. As per discussion in D56556, we will not add NameLen arguments to IR building APIs, for the following reasons: 1. We do not want to deprecate all of the IR building APIs, just to add a NameLen argument to each one. 2. Consistency is important, so adding it just to new ones is unfortunate. 3. The IR names are completely optional, useful for readability of IR only. There is no value in ever supporting nul bytes. Differential Revision: https://reviews.llvm.org/D56669 llvm-svn: 351076
Diffstat (limited to 'llvm/lib/IR/Core.cpp')
-rw-r--r--llvm/lib/IR/Core.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/llvm/lib/IR/Core.cpp b/llvm/lib/IR/Core.cpp
index 6f7c7afc59d..357b8cd43ab 100644
--- a/llvm/lib/IR/Core.cpp
+++ b/llvm/lib/IR/Core.cpp
@@ -2533,9 +2533,8 @@ LLVMBasicBlockRef LLVMGetPreviousBasicBlock(LLVMBasicBlockRef BB) {
}
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 LLVMBuildPointerCast(LLVMBuilderRef B, LLVMValueRef Val,
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,
OpenPOWER on IntegriCloud