summaryrefslogtreecommitdiffstats
path: root/clang/CodeGen/CGBuiltin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/CodeGen/CGBuiltin.cpp')
-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