summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/boolreference
diff options
context:
space:
mode:
authorEnrico Granata <egranata@apple.com>2016-03-15 23:38:04 +0000
committerEnrico Granata <egranata@apple.com>2016-03-15 23:38:04 +0000
commitab2b0cb992481a4e25d3f6ae3dbd07fc798ce4a6 (patch)
treef8394b34a7ed277654f83d1cb20c46fe238033a6 /lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/boolreference
parent35f94bb72cc084d596d27de3691b156c5a715629 (diff)
downloadbcm5719-llvm-ab2b0cb992481a4e25d3f6ae3dbd07fc798ce4a6.tar.gz
bcm5719-llvm-ab2b0cb992481a4e25d3f6ae3dbd07fc798ce4a6.zip
On some platforms, the compiler is allowed to assume that BOOL == bool. On others, BOOL == signed char.
This can cause differences in which bit patterns end up meaning YES or NO. In general, however, 0 == NO and 1 == YES. To keep it simple, LLDB will now show "YES" and "NO" only for 1 and 0 respectively, and format other values as the plain numeric value instead. Fixes rdar://24809994 llvm-svn: 263604
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/boolreference')
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/boolreference/TestFormattersBoolRefPtr.py6
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/boolreference/main.mm4
2 files changed, 9 insertions, 1 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/boolreference/TestFormattersBoolRefPtr.py b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/boolreference/TestFormattersBoolRefPtr.py
index 6912449a700..fb3511ebd91 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/boolreference/TestFormattersBoolRefPtr.py
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/boolreference/TestFormattersBoolRefPtr.py
@@ -57,6 +57,8 @@ class DataFormatterBoolRefPtr(TestBase):
substrs = ['YES'])
self.expect('frame variable no_ref',
substrs = ['NO'])
+ self.expect('frame variable unset_ref',
+ substrs = ['12'])
# Now check that we use the right summary for BOOL*
@@ -64,6 +66,8 @@ class DataFormatterBoolRefPtr(TestBase):
substrs = ['YES'])
self.expect('frame variable no_ptr',
substrs = ['NO'])
+ self.expect('frame variable unset_ptr',
+ substrs = ['12'])
# Now check that we use the right summary for BOOL
@@ -71,3 +75,5 @@ class DataFormatterBoolRefPtr(TestBase):
substrs = ['YES'])
self.expect('frame variable no',
substrs = ['NO'])
+ self.expect('frame variable unset',
+ substrs = ['12'])
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/boolreference/main.mm b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/boolreference/main.mm
index a2461fd9da9..22c8790a754 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/boolreference/main.mm
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/boolreference/main.mm
@@ -11,17 +11,19 @@
int main (int argc, const char * argv[])
{
-
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
BOOL yes = YES;
BOOL no = NO;
+ BOOL unset = 12;
BOOL &yes_ref = yes;
BOOL &no_ref = no;
+ BOOL &unset_ref = unset;
BOOL* yes_ptr = &yes;
BOOL* no_ptr = &no;
+ BOOL* unset_ptr = &unset;
[pool drain];// Set break point at this line.
return 0;
OpenPOWER on IntegriCloud