diff options
author | Chris Lattner <sabre@nondot.org> | 2008-10-06 04:48:17 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-10-06 04:48:17 +0000 |
commit | a62a03b282dd996f6cc1ff498b7ff306ad3959f8 (patch) | |
tree | a352ee01ae21e38316ffd7f93d725dea3c51c2d3 /lib/AST/Expr.cpp | |
parent | 722c288d15fd7c41ebfc22de7688de5fe34611d9 (diff) |
a more efficient test for __builtin_classify_type
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57149 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/Expr.cpp')
-rw-r--r-- | lib/AST/Expr.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/AST/Expr.cpp b/lib/AST/Expr.cpp index 14b7b51ebb..82ca82e0e4 100644 --- a/lib/AST/Expr.cpp +++ b/lib/AST/Expr.cpp @@ -188,7 +188,8 @@ bool CallExpr::isBuiltinClassifyType(llvm::APSInt &Result) const { 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); |