[Frontend] Add a predefined macro that describes the Objective-C bool type
authorAlex Lorenz <arphaman@gmail.com>
Mon, 21 Nov 2016 11:05:15 +0000 (11:05 +0000)
committerAlex Lorenz <arphaman@gmail.com>
Mon, 21 Nov 2016 11:05:15 +0000 (11:05 +0000)
commit9229d332bfc4521d6213d3cc9b485e70f812f1ee
tree92ed0dbc82ebd7b22a1bb3636f773dcdaa4da04e
parent3bc6fe78f62fb5e43feeba25e32fbaedfc647ef8
[Frontend] Add a predefined macro that describes the Objective-C bool type

This commit adds a new predefined macro named __OBJC_BOOL_IS_BOOL that describes
the Objective-C boolean type: its value is zero if the Objective-C boolean uses
the signed character type, otherwise its value is one as the Objective-C boolean
uses the builtin boolean type.

rdar://21170440

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

llvm-svn: 287529
clang/lib/Frontend/InitPreprocessor.cpp
clang/test/Frontend/objc-bool-is-bool.m [new file with mode: 0644]