Use a dedicated safe wrapper for LLVMRustGetHostCPUName
This commit is contained in:
parent
36040aacc2
commit
0fa86f9660
3 changed files with 23 additions and 15 deletions
|
@ -382,9 +382,9 @@ extern "C" void LLVMRustGetTargetFeature(LLVMTargetMachineRef TM, size_t Index,
|
|||
*Desc = Feat.Desc;
|
||||
}
|
||||
|
||||
extern "C" const char *LLVMRustGetHostCPUName(size_t *len) {
|
||||
extern "C" const char *LLVMRustGetHostCPUName(size_t *OutLen) {
|
||||
StringRef Name = sys::getHostCPUName();
|
||||
*len = Name.size();
|
||||
*OutLen = Name.size();
|
||||
return Name.data();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue