[llvm-commits] [dragonegg] r114805 - /dragonegg/trunk/x86/llvm-target.cpp
Duncan Sands
baldrick at free.fr
Sun Sep 26 07:00:14 PDT 2010
Author: baldrick
Date: Sun Sep 26 09:00:14 2010
New Revision: 114805
URL: http://llvm.org/viewvc/llvm-project?rev=114805&view=rev
Log:
Fix builtin matching after the previous commit: adjust for dropping the
__builtin_ia32_ prefix from builtin names.
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=114805&r1=114804&r2=114805&view=diff
==============================================================================
--- dragonegg/trunk/x86/llvm-target.cpp (original)
+++ dragonegg/trunk/x86/llvm-target.cpp Sun Sep 26 09:00:14 2010
@@ -113,8 +113,9 @@
Checked = true;
}
#endif
- HandlerEntry ToFind
- = {IDENTIFIER_POINTER(DECL_NAME(fndecl)), SearchForHandler};
+ const char *Identifier = IDENTIFIER_POINTER(DECL_NAME(fndecl));
+ assert(!strncmp(Identifier, "__builtin_ia32_", 15) && "Unexpected prefix!");
+ HandlerEntry ToFind = {Identifier + 15, SearchForHandler};
const HandlerEntry *E = std::lower_bound(Handlers, Handlers + N, ToFind, LT);
Handler = (E == Handlers + N) || strcmp(E->Name, ToFind.Name) ?
UnsupportedBuiltin : E->Handler;
More information about the llvm-commits
mailing list