summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2007-10-29 02:59:40 +0000
committerAnders Carlsson <andersca@mac.com>2007-10-29 02:59:40 +0000
commitceced4ca730cd3378174bb9bab30454cfcfe027f (patch)
tree575329b5fed31fdbaafe83ca2767d9410ad0e1dc
parent7080597adf73fca3dfb906589b74f18853873539 (diff)
downloadbcm5719-llvm-ceced4ca730cd3378174bb9bab30454cfcfe027f.tar.gz
bcm5719-llvm-ceced4ca730cd3378174bb9bab30454cfcfe027f.zip
Generate code for __builtin_classify_type.
llvm-svn: 43429
-rw-r--r--clang/CodeGen/CGBuiltin.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/clang/CodeGen/CGBuiltin.cpp b/clang/CodeGen/CGBuiltin.cpp
index 2ca84e25d44..ecac12b1f4b 100644
--- a/clang/CodeGen/CGBuiltin.cpp
+++ b/clang/CodeGen/CGBuiltin.cpp
@@ -63,7 +63,15 @@ RValue CodeGenFunction::EmitBuiltinExpr(unsigned BuiltinID, const CallExpr *E) {
return RValue::get(V);
}
+ case Builtin::BI__builtin_classify_type: {
+ llvm::APSInt Result(32);
+
+ if (!E->isBuiltinClassifyType(Result))
+ assert(0 && "Expr not __builtin_classify_type!");
+
+ return RValue::get(llvm::ConstantInt::get(Result));
+ }
}
-
+
return RValue::get(0);
}
OpenPOWER on IntegriCloud