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 | d1d152a61349efaa8a01c14490639f31ebfd9831 (patch) | |
tree | 4ff4b72004187031cc02df3c76305277a4fe4167 /clang/lib/AST/Expr.cpp | |
parent | 7875876e46abdec126618b11c581e0ce112495d9 (diff) | |
download | bcm5719-llvm-d1d152a61349efaa8a01c14490639f31ebfd9831.tar.gz bcm5719-llvm-d1d152a61349efaa8a01c14490639f31ebfd9831.zip |
a more efficient test for __builtin_classify_type
llvm-svn: 57149
Diffstat (limited to 'clang/lib/AST/Expr.cpp')
-rw-r--r-- | clang/lib/AST/Expr.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/AST/Expr.cpp b/clang/lib/AST/Expr.cpp index 14b7b51ebb0..82ca82e0e41 100644 --- a/clang/lib/AST/Expr.cpp +++ b/clang/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); |