forked from OSchip/llvm-project
[LLVM-C] Fix Windows Build of Core
strndup doesn't exist outside of GNU-land and modern macOSes. Use strdup instead as c_str() is guaranteed to be NUL-terminated. llvm-svn: 346197
This commit is contained in:
parent
927c8803c1
commit
6c7073f2f8
|
@ -2316,7 +2316,7 @@ const char *LLVMIntrinsicCopyOverloadedName(unsigned ID,
|
|||
ArrayRef<Type*> Tys(unwrap(ParamTypes), ParamCount);
|
||||
auto Str = llvm::Intrinsic::getName(IID, Tys);
|
||||
*NameLength = Str.length();
|
||||
return strndup(Str.c_str(), Str.length());
|
||||
return strdup(Str.c_str());
|
||||
}
|
||||
|
||||
LLVMBool LLVMIntrinsicIsOverloaded(unsigned ID) {
|
||||
|
|
Loading…
Reference in New Issue