[cfe-commits] r57149 - /cfe/trunk/lib/AST/Expr.cpp
Chris Lattner
sabre at nondot.org
Sun Oct 5 21:48:17 PDT 2008
Author: lattner
Date: Sun Oct 5 23:48:17 2008
New Revision: 57149
URL: http://llvm.org/viewvc/llvm-project?rev=57149&view=rev
Log:
a more efficient test for __builtin_classify_type
Modified:
cfe/trunk/lib/AST/Expr.cpp
Modified: cfe/trunk/lib/AST/Expr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Expr.cpp?rev=57149&r1=57148&r2=57149&view=diff
==============================================================================
--- cfe/trunk/lib/AST/Expr.cpp (original)
+++ cfe/trunk/lib/AST/Expr.cpp Sun Oct 5 23:48:17 2008
@@ -188,7 +188,8 @@
return false;
// We have a DeclRefExpr.
- if (strcmp(DRE->getDecl()->getName(), "__builtin_classify_type") == 0) {
+ if (DRE->getDecl()->getIdentifier()->getBuiltinID() ==
+ Builtin::BI__builtin_classify_type) {
// If no argument was supplied, default to "no_type_class". This isn't
// ideal, however it's what gcc does.
Result = static_cast<uint64_t>(no_type_class);
More information about the cfe-commits
mailing list