Commit Graph

7 Commits

Author SHA1 Message Date
Benjamin Kramer e577660ee1 Make helpers static. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@294838 91177308-0d34-0410-b5e6-96231b3b80d8
2017-02-11 12:21:17 +00:00
Sylvestre Ledru 7110ec78c8 Remove unused 'using' declaration. Found by clang-tidy: misc-unused-using-decls NFC
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@293381 91177308-0d34-0410-b5e6-96231b3b80d8
2017-01-28 13:41:50 +00:00
Mehdi Amini 7365ea6ab3 Fix os_log formating with arbitrary precision and field width
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289761 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-15 04:02:31 +00:00
Mehdi Amini 73e55da0d5 Fix handling of %% format specifier in os_log builtins.
Returning `false` was stopping the parsing of further arguments,
which wasn't intended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@285047 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-25 00:48:48 +00:00
Mehdi Amini e753a979e8 Add support for __builtin_os_log_format[_buffer_size]
This reverts commit r285007 and reapply r284990, with a fix for the
opencl test that I broke. Original commit message follows:

These new builtins support a mechanism for logging OS events, using a
printf-like format string to specify the layout of data in a buffer.
The _buffer_size version of the builtin can be used to determine the size
of the buffer to allocate to hold the data, and then __builtin_os_log_format
can write data into that buffer. This implements format checking to report
mismatches between the format string and the data arguments. Most of this
code was written by Chris Willmore.

Differential Revision: https://reviews.llvm.org/D25888

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@285019 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-24 20:39:34 +00:00
Mehdi Amini 16b762b316 Revert "Add support for __builtin_os_log_format[_buffer_size]"
This reverts commit r284990, two opencl test are broken

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@285007 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-24 19:41:36 +00:00
Mehdi Amini 27310e29ec Add support for __builtin_os_log_format[_buffer_size]
These new builtins support a mechanism for logging OS events, using a
printf-like format string to specify the layout of data in a buffer.
The _buffer_size version of the builtin can be used to determine the size
of the buffer to allocate to hold the data, and then __builtin_os_log_format
can write data into that buffer. This implements format checking to report
mismatches between the format string and the data arguments. Most of this
code was written by Chris Willmore.

Differential Revision: https://reviews.llvm.org/D25888

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@284990 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-24 16:56:23 +00:00