mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
[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
5eb209277e
commit
1e6646c3db
@ -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…
x
Reference in New Issue
Block a user