mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-02 00:36:36 +00:00
[llvm-c] Make LLVMGetTargetFromName actually work
LLVMGetTargetFromName used to compare two char* strings directly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194771 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
fa74752298
commit
e016a163e9
@ -73,9 +73,10 @@ LLVMTargetRef LLVMGetNextTarget(LLVMTargetRef T) {
|
||||
}
|
||||
|
||||
LLVMTargetRef LLVMGetTargetFromName(const char *Name) {
|
||||
StringRef NameRef = Name;
|
||||
for (TargetRegistry::iterator IT = TargetRegistry::begin(),
|
||||
IE = TargetRegistry::end(); IT != IE; ++IT) {
|
||||
if (IT->getName() == Name)
|
||||
if (IT->getName() == NameRef)
|
||||
return wrap(&*IT);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user