From 676a48751d9acc6370ea30ae87062c3c4bd5e347 Mon Sep 17 00:00:00 2001 From: Matt Kopec Date: Thu, 21 Feb 2013 23:55:31 +0000 Subject: [PATCH] Fix clang warnings related to python macro redefinition and printf format specifiers. llvm-svn: 175829 --- lldb/source/DataFormatters/FormatCache.cpp | 2 ++ lldb/source/DataFormatters/LibCxx.cpp | 2 ++ lldb/source/DataFormatters/LibStdcpp.cpp | 2 ++ lldb/source/DataFormatters/NSArray.cpp | 2 ++ lldb/source/DataFormatters/NSDictionary.cpp | 2 ++ lldb/source/DataFormatters/NSSet.cpp | 2 ++ lldb/source/DataFormatters/TypeCategory.cpp | 2 ++ lldb/source/DataFormatters/TypeCategoryMap.cpp | 2 ++ lldb/source/DataFormatters/TypeFormat.cpp | 2 ++ lldb/source/DataFormatters/TypeSummary.cpp | 2 ++ lldb/source/DataFormatters/TypeSynthetic.cpp | 2 ++ lldb/source/Expression/ClangExpressionDeclMap.cpp | 2 +- lldb/source/Interpreter/OptionGroupFormat.cpp | 2 ++ .../ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp | 4 ++-- lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp | 2 +- lldb/source/Target/Process.cpp | 2 +- 16 files changed, 29 insertions(+), 5 deletions(-) diff --git a/lldb/source/DataFormatters/FormatCache.cpp b/lldb/source/DataFormatters/FormatCache.cpp index 69f32ec8670a..af7b1c386c32 100644 --- a/lldb/source/DataFormatters/FormatCache.cpp +++ b/lldb/source/DataFormatters/FormatCache.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +#include "lldb/lldb-python.h" + // C Includes // C++ Includes diff --git a/lldb/source/DataFormatters/LibCxx.cpp b/lldb/source/DataFormatters/LibCxx.cpp index 41cb264a69c6..5074d17115b7 100644 --- a/lldb/source/DataFormatters/LibCxx.cpp +++ b/lldb/source/DataFormatters/LibCxx.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +#include "lldb/lldb-python.h" + #include "lldb/DataFormatters/CXXFormatterFunctions.h" #include "lldb/Core/DataBufferHeap.h" diff --git a/lldb/source/DataFormatters/LibStdcpp.cpp b/lldb/source/DataFormatters/LibStdcpp.cpp index 76f4eba22352..a013051fa640 100644 --- a/lldb/source/DataFormatters/LibStdcpp.cpp +++ b/lldb/source/DataFormatters/LibStdcpp.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +#include "lldb/lldb-python.h" + #include "lldb/DataFormatters/CXXFormatterFunctions.h" #include "lldb/Core/DataBufferHeap.h" diff --git a/lldb/source/DataFormatters/NSArray.cpp b/lldb/source/DataFormatters/NSArray.cpp index ece97cc65b69..4e084685a196 100644 --- a/lldb/source/DataFormatters/NSArray.cpp +++ b/lldb/source/DataFormatters/NSArray.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +#include "lldb/lldb-python.h" + #include "lldb/DataFormatters/CXXFormatterFunctions.h" #include "lldb/Core/DataBufferHeap.h" diff --git a/lldb/source/DataFormatters/NSDictionary.cpp b/lldb/source/DataFormatters/NSDictionary.cpp index 18f00cc395cb..b78a8d591904 100644 --- a/lldb/source/DataFormatters/NSDictionary.cpp +++ b/lldb/source/DataFormatters/NSDictionary.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +#include "lldb/lldb-python.h" + #include "lldb/DataFormatters/CXXFormatterFunctions.h" #include "lldb/Core/DataBufferHeap.h" diff --git a/lldb/source/DataFormatters/NSSet.cpp b/lldb/source/DataFormatters/NSSet.cpp index 5f53baca330e..8dea1a35049c 100644 --- a/lldb/source/DataFormatters/NSSet.cpp +++ b/lldb/source/DataFormatters/NSSet.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +#include "lldb/lldb-python.h" + #include "lldb/DataFormatters/CXXFormatterFunctions.h" #include "lldb/Core/DataBufferHeap.h" diff --git a/lldb/source/DataFormatters/TypeCategory.cpp b/lldb/source/DataFormatters/TypeCategory.cpp index 526630cdc561..c887be5da496 100644 --- a/lldb/source/DataFormatters/TypeCategory.cpp +++ b/lldb/source/DataFormatters/TypeCategory.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +#include "lldb/lldb-python.h" + #include "lldb/DataFormatters/TypeCategory.h" // C Includes diff --git a/lldb/source/DataFormatters/TypeCategoryMap.cpp b/lldb/source/DataFormatters/TypeCategoryMap.cpp index 6e66e6744b41..cd11016d797f 100644 --- a/lldb/source/DataFormatters/TypeCategoryMap.cpp +++ b/lldb/source/DataFormatters/TypeCategoryMap.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +#include "lldb/lldb-python.h" + #include "lldb/DataFormatters/TypeCategoryMap.h" // C Includes diff --git a/lldb/source/DataFormatters/TypeFormat.cpp b/lldb/source/DataFormatters/TypeFormat.cpp index 1dda8bc1b022..279704f2af12 100644 --- a/lldb/source/DataFormatters/TypeFormat.cpp +++ b/lldb/source/DataFormatters/TypeFormat.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +#include "lldb/lldb-python.h" + // C Includes // C++ Includes diff --git a/lldb/source/DataFormatters/TypeSummary.cpp b/lldb/source/DataFormatters/TypeSummary.cpp index 8ead75a1953e..cfff97d2c155 100644 --- a/lldb/source/DataFormatters/TypeSummary.cpp +++ b/lldb/source/DataFormatters/TypeSummary.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +#include "lldb/lldb-python.h" + // C Includes // C++ Includes diff --git a/lldb/source/DataFormatters/TypeSynthetic.cpp b/lldb/source/DataFormatters/TypeSynthetic.cpp index e2e0bffb5b02..b0d4cda104a0 100644 --- a/lldb/source/DataFormatters/TypeSynthetic.cpp +++ b/lldb/source/DataFormatters/TypeSynthetic.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +#include "lldb/lldb-python.h" + // C Includes // C++ Includes diff --git a/lldb/source/Expression/ClangExpressionDeclMap.cpp b/lldb/source/Expression/ClangExpressionDeclMap.cpp index 1214db368fb5..9851a4667689 100644 --- a/lldb/source/Expression/ClangExpressionDeclMap.cpp +++ b/lldb/source/Expression/ClangExpressionDeclMap.cpp @@ -2021,7 +2021,7 @@ ClangExpressionDeclMap::DoMaterializeOneVariable { if (value_byte_size != value_data_extractor.GetByteSize()) { - err.SetErrorStringWithFormat ("Size mismatch for %s: %llu versus %llu", + err.SetErrorStringWithFormat ("Size mismatch for %s: %" PRIu64 " versus %" PRIu64, name.GetCString(), (uint64_t)value_data_extractor.GetByteSize(), (uint64_t)value_byte_size); diff --git a/lldb/source/Interpreter/OptionGroupFormat.cpp b/lldb/source/Interpreter/OptionGroupFormat.cpp index 944bb18107d1..790cbb668fa1 100644 --- a/lldb/source/Interpreter/OptionGroupFormat.cpp +++ b/lldb/source/Interpreter/OptionGroupFormat.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +#include "lldb/lldb-python.h" + #include "lldb/Interpreter/OptionGroupFormat.h" // C Includes diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp index ff5a87e04801..37bdacdd3aa4 100644 --- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp +++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp @@ -549,10 +549,10 @@ public: void Dump () { - printf ("RemoteNXMapTable.m_load_addr = 0x%llx\n", m_load_addr); + printf ("RemoteNXMapTable.m_load_addr = 0x%" PRIx64 "\n", m_load_addr); printf ("RemoteNXMapTable.m_count = %u\n", m_count); printf ("RemoteNXMapTable.m_num_buckets_minus_one = %u\n", m_num_buckets_minus_one); - printf ("RemoteNXMapTable.m_buckets_ptr = 0x%llx\n", m_buckets_ptr); + printf ("RemoteNXMapTable.m_buckets_ptr = 0x%" PRIX64 "\n", m_buckets_ptr); } bool diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp index c4f87d98e742..40d5bd269d30 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp @@ -414,7 +414,7 @@ DWARFCompileUnit::BuildAddressRangeTable (SymbolFileDWARF* dwarf2Data, { const LineTable::FileAddressRanges::Entry &range = file_ranges.GetEntryRef(idx); debug_aranges->AppendRange(GetOffset(), range.GetRangeBase(), range.GetRangeEnd()); - printf ("0x%8.8x: [0x%16.16llx - 0x%16.16llx)\n", GetOffset(), range.GetRangeBase(), range.GetRangeEnd()); + printf ("0x%8.8x: [0x%16.16" PRIx64 " - 0x%16.16" PRIx64 ")\n", GetOffset(), range.GetRangeBase(), range.GetRangeEnd()); } } } diff --git a/lldb/source/Target/Process.cpp b/lldb/source/Target/Process.cpp index 8b83ee679a63..28816c97fb3b 100644 --- a/lldb/source/Target/Process.cpp +++ b/lldb/source/Target/Process.cpp @@ -4720,7 +4720,7 @@ Process::RunThreadPlan (ExecutionContext &exe_ctx, { if (timeout_ptr) { - log->Printf ("Process::RunThreadPlan(): about to wait - now is %llu - endpoint is %llu", + log->Printf ("Process::RunThreadPlan(): about to wait - now is %" PRIu64 " - endpoint is %" PRIu64, TimeValue::Now().GetAsMicroSecondsSinceJan1_1970(), timeout_ptr->GetAsMicroSecondsSinceJan1_1970()); }