[llvm-commits] [dragonegg] r103617 - /dragonegg/trunk/x86/llvm-target.cpp
Duncan Sands
baldrick at free.fr
Wed May 12 09:01:19 PDT 2010
Author: baldrick
Date: Wed May 12 11:01:19 2010
New Revision: 103617
URL: http://llvm.org/viewvc/llvm-project?rev=103617&view=rev
Log:
Fix thinko: if the name is not found, then that doesn't mean that the
end iterator is returned.
Modified:
dragonegg/trunk/x86/llvm-target.cpp
Modified: dragonegg/trunk/x86/llvm-target.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/x86/llvm-target.cpp?rev=103617&r1=103616&r2=103617&view=diff
==============================================================================
--- dragonegg/trunk/x86/llvm-target.cpp (original)
+++ dragonegg/trunk/x86/llvm-target.cpp Wed May 12 11:01:19 2010
@@ -745,7 +745,8 @@
#endif
HandlerEntry ToFind = {IDENTIFIER_POINTER(DECL_NAME(fndecl)), NULL};
const HandlerEntry *E = std::lower_bound(Handlers, Handlers + N, ToFind, LT);
- Handler = E == Handlers + N ? &&unknown : E->Handler;
+ Handler = (E == Handlers + N) || strcmp(E->Name, ToFind.Name) ?
+ &&unknown : E->Handler;
}
bool flip = false;
More information about the llvm-commits
mailing list