diff options
author | Anders Carlsson <andersca@mac.com> | 2007-10-29 02:59:40 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2007-10-29 02:59:40 +0000 |
commit | 89799cf254c91ca110f113a33eebe8b1b4d1a761 (patch) | |
tree | b16b40b5263a82f5d8d4da2ddc2cf65f1a0b8faf | |
parent | c67ad5f299bb2c09e4567def8ff0d34bd15a42fd (diff) |
Generate code for __builtin_classify_type.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43429 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | CodeGen/CGBuiltin.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/CodeGen/CGBuiltin.cpp b/CodeGen/CGBuiltin.cpp index 2ca84e25d4..ecac12b1f4 100644 --- a/CodeGen/CGBuiltin.cpp +++ b/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); } |