summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGBuiltin.cpp
diff options
context:
space:
mode:
authorTim Northover <tnorthover@apple.com>2018-11-01 13:49:54 +0000
committerTim Northover <tnorthover@apple.com>2018-11-01 13:49:54 +0000
commita94ecc619b3eb82144af0ac049676728b84caa77 (patch)
tree9fe52dac0071b3a19aeab1f378daa9bcadc1ede2 /clang/lib/CodeGen/CGBuiltin.cpp
parent1546efd4a7c1fffe0428ea4f27bf2037eeec4df3 (diff)
downloadbcm5719-llvm-a94ecc619b3eb82144af0ac049676728b84caa77.tar.gz
bcm5719-llvm-a94ecc619b3eb82144af0ac049676728b84caa77.zip
Logging: make os_log buffer size an integer constant expression.
The size of an os_log buffer is known at any stage of compilation, so making it a constant expression means that the common idiom of declaring a buffer for it won't result in a VLA. That allows the compiler to skip saving and restoring the stack pointer around such buffers. llvm-svn: 345828
Diffstat (limited to 'clang/lib/CodeGen/CGBuiltin.cpp')
-rw-r--r--clang/lib/CodeGen/CGBuiltin.cpp7
1 files changed, 0 insertions, 7 deletions
diff --git a/clang/lib/CodeGen/CGBuiltin.cpp b/clang/lib/CodeGen/CGBuiltin.cpp
index c67db26711a..271dc2a9662 100644
--- a/clang/lib/CodeGen/CGBuiltin.cpp
+++ b/clang/lib/CodeGen/CGBuiltin.cpp
@@ -3609,13 +3609,6 @@ 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