OSDN Git Service
(root)
/
android-x86
/
external-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fa74752
)
[llvm-c] Make LLVMGetTargetFromName actually work
author
Peter Zotov
<whitequark@whitequark.org>
Fri, 15 Nov 2013 02:51:18 +0000
(
02:51
+0000)
committer
Peter Zotov
<whitequark@whitequark.org>
Fri, 15 Nov 2013 02:51:18 +0000
(
02:51
+0000)
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
lib/Target/TargetMachineC.cpp
patch
|
blob
|
history
diff --git
a/lib/Target/TargetMachineC.cpp
b/lib/Target/TargetMachineC.cpp
index
e111380
..
3d5f827
100644
(file)
--- a/
lib/Target/TargetMachineC.cpp
+++ b/
lib/Target/TargetMachineC.cpp
@@
-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() == Name
Ref
)
return wrap(&*IT);
}