aboutsummaryrefslogtreecommitdiff
path: root/source/DataFormatters/CXXFormatterFunctions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/DataFormatters/CXXFormatterFunctions.cpp')
-rw-r--r--source/DataFormatters/CXXFormatterFunctions.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/source/DataFormatters/CXXFormatterFunctions.cpp b/source/DataFormatters/CXXFormatterFunctions.cpp
index fba92170d832..e00413556cc9 100644
--- a/source/DataFormatters/CXXFormatterFunctions.cpp
+++ b/source/DataFormatters/CXXFormatterFunctions.cpp
@@ -1003,11 +1003,11 @@ lldb_private::formatters::NSStringSummaryProvider (ValueObject& valobj, Stream&
if (!has_null && has_explicit_length && !is_special)
{
lldb::addr_t explicit_length_offset = 2*ptr_size;
- if (is_mutable and not is_inline)
+ if (is_mutable && !is_inline)
explicit_length_offset = explicit_length_offset + ptr_size; // notInlineMutable.length;
else if (is_inline)
explicit_length = explicit_length + 0; // inline1.length;
- else if (not is_inline and not is_mutable)
+ else if (!is_inline && !is_mutable)
explicit_length_offset = explicit_length_offset + ptr_size; // notInlineImmutable1.length;
else
explicit_length_offset = 0;
@@ -1039,7 +1039,7 @@ lldb_private::formatters::NSStringSummaryProvider (ValueObject& valobj, Stream&
location = process_sp->ReadPointerFromMemory(location, error);
if (error.Fail())
return false;
- if (has_explicit_length and is_unicode)
+ if (has_explicit_length && is_unicode)
{
ReadUTFBufferAndDumpToStreamOptions<UTF16> options;
options.SetConversionFunction(ConvertUTF16toUTF8);
@@ -1237,6 +1237,7 @@ lldb_private::formatters::GetOSXEpoch ()
static time_t epoch = 0;
if (!epoch)
{
+#ifndef _WIN32
tzset();
tm tm_epoch;
tm_epoch.tm_sec = 0;
@@ -1249,6 +1250,7 @@ lldb_private::formatters::GetOSXEpoch ()
tm_epoch.tm_gmtoff = 0;
tm_epoch.tm_zone = NULL;
epoch = timegm(&tm_epoch);
+#endif
}
return epoch;
}