diff options
author | Tim Northover <tnorthover@apple.com> | 2018-11-02 13:14:11 +0000 |
---|---|---|
committer | Tim Northover <tnorthover@apple.com> | 2018-11-02 13:14:11 +0000 |
commit | 9a556415ec611527466d8eb3b8953e56575e954a (patch) | |
tree | 19ef7ebd50163ba44547f880f2701a2cf63fd654 /lib/Sema/SemaChecking.cpp | |
parent | 897497662230baacf98ae95d2ab305f6724826e2 (diff) | |
download | clang-9a556415ec611527466d8eb3b8953e56575e954a.tar.gz |
Reapply 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.
This also moves the OSLog and other FormatString helpers from
libclangAnalysis to libclangAST to avoid a circular dependency.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@345971 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaChecking.cpp')
-rw-r--r-- | lib/Sema/SemaChecking.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaChecking.cpp b/lib/Sema/SemaChecking.cpp index 792171a4f5..4660ed55ae 100644 --- a/lib/Sema/SemaChecking.cpp +++ b/lib/Sema/SemaChecking.cpp @@ -27,6 +27,7 @@ #include "clang/AST/ExprCXX.h" #include "clang/AST/ExprObjC.h" #include "clang/AST/ExprOpenMP.h" +#include "clang/AST/FormatString.h" #include "clang/AST/NSAPI.h" #include "clang/AST/NonTrivialTypeVisitor.h" #include "clang/AST/OperationKinds.h" @@ -35,7 +36,6 @@ #include "clang/AST/Type.h" #include "clang/AST/TypeLoc.h" #include "clang/AST/UnresolvedSet.h" -#include "clang/Analysis/Analyses/FormatString.h" #include "clang/Basic/AddressSpaces.h" #include "clang/Basic/CharInfo.h" #include "clang/Basic/Diagnostic.h" |