summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGBuiltin.cpp
diff options
context:
space:
mode:
authorTim Northover <tnorthover@apple.com>2018-11-01 16:15:24 +0000
committerTim Northover <tnorthover@apple.com>2018-11-01 16:15:24 +0000
commitd686dbbc7c24a81a46f61733d48df866f2874e24 (patch)
tree257b32b0f9d6dce6f66db1cd98998df5f0b04f44 /clang/lib/CodeGen/CGBuiltin.cpp
parent32a34e6d7e97c37c18b2051d37d932c38758b9d0 (diff)
downloadbcm5719-llvm-d686dbbc7c24a81a46f61733d48df866f2874e24.tar.gz
bcm5719-llvm-d686dbbc7c24a81a46f61733d48df866f2874e24.zip
Revert "Logging: make os_log buffer size an integer constant expression.
This also reverts a couple of follow-up commits trying to fix the dependency issues. Latest revision added a cyclic dependency that can't just be patched up in 5 minutes. llvm-svn: 345846
Diffstat (limited to 'clang/lib/CodeGen/CGBuiltin.cpp')
-rw-r--r--clang/lib/CodeGen/CGBuiltin.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGBuiltin.cpp b/clang/lib/CodeGen/CGBuiltin.cpp
index 271dc2a9662..c67db26711a 100644
--- a/clang/lib/CodeGen/CGBuiltin.cpp
+++ b/clang/lib/CodeGen/CGBuiltin.cpp
@@ -3609,6 +3609,13 @@ RValue CodeGenFunction::EmitBuiltinExpr(const FunctionDecl *FD,
case Builtin::BI__builtin_os_log_format:
return emitBuiltinOSLogFormat(*E);
+ case Builtin::BI__builtin_os_log_format_buffer_size: {
+ analyze_os_log::OSLogBufferLayout Layout;
+ analyze_os_log::computeOSLogBufferLayout(CGM.getContext(), E, Layout);
+ return RValue::get(ConstantInt::get(ConvertType(E->getType()),
+ Layout.size().getQuantity()));
+ }
+
case Builtin::BI__xray_customevent: {
if (!ShouldXRayInstrumentFunction())
return RValue::getIgnored();
OpenPOWER on IntegriCloud