mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-27 13:30:05 +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