aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CodeGen/CGBuiltin.cpp10
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);
}