Commit Graph

7 Commits

Author SHA1 Message Date
Benjamin Kramer 357c9e1a4b Make helpers static. NFC.
llvm-svn: 294838
2017-02-11 12:21:17 +00:00
Sylvestre Ledru fccc52aa66 Remove unused 'using' declaration. Found by clang-tidy: misc-unused-using-decls NFC
llvm-svn: 293381
2017-01-28 13:41:50 +00:00
Mehdi Amini ab11d83048 Fix os_log formating with arbitrary precision and field width
llvm-svn: 289761
2016-12-15 04:02:31 +00:00
Mehdi Amini 9825ab0433 Fix handling of %% format specifier in os_log builtins.
Returning `false` was stopping the parsing of further arguments,
which wasn't intended.

llvm-svn: 285047
2016-10-25 00:48:48 +00:00
Mehdi Amini 06d367c6c6 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

llvm-svn: 285019
2016-10-24 20:39:34 +00:00
Mehdi Amini 9c39fdceda Revert "Add support for __builtin_os_log_format[_buffer_size]"
This reverts commit r284990, two opencl test are broken

llvm-svn: 285007
2016-10-24 19:41:36 +00:00
Mehdi Amini 29034362ae 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

llvm-svn: 284990
2016-10-24 16:56:23 +00:00