diff options
author | Raphael Isemann <teemperor@gmail.com> | 2021-05-26 12:19:37 +0200 |
---|---|---|
committer | Raphael Isemann <teemperor@gmail.com> | 2021-05-26 12:46:12 +0200 |
commit | 76e47d4887f456878c0e2f20ebfae36267006cd7 (patch) | |
tree | eda2cb15f0f5c338c93794e9e3fa8098ada5a350 /lldb/source | |
parent | 21aec4fdc5de213a1009bc684adff988c290c6b3 (diff) | |
download | llvm-76e47d4887f456878c0e2f20ebfae36267006cd7.zip llvm-76e47d4887f456878c0e2f20ebfae36267006cd7.tar.gz llvm-76e47d4887f456878c0e2f20ebfae36267006cd7.tar.bz2 |
[lldb][NFC] Use C++ versions of the deprecated C standard library headers
The C headers are deprecated so as requested in D102845, this is replacing them
all with their (not deprecated) C++ equivalent.
Reviewed By: shafik
Differential Revision: https://reviews.llvm.org/D103084
Diffstat (limited to 'lldb/source')
190 files changed, 315 insertions, 316 deletions
diff --git a/lldb/source/API/SBDeclaration.cpp b/lldb/source/API/SBDeclaration.cpp index 2748190..1496096 100644 --- a/lldb/source/API/SBDeclaration.cpp +++ b/lldb/source/API/SBDeclaration.cpp @@ -14,7 +14,7 @@ #include "lldb/Host/PosixApi.h" #include "lldb/Utility/Stream.h" -#include <limits.h> +#include <climits> using namespace lldb; using namespace lldb_private; diff --git a/lldb/source/API/SBError.cpp b/lldb/source/API/SBError.cpp index f979572..89b5f26 100644 --- a/lldb/source/API/SBError.cpp +++ b/lldb/source/API/SBError.cpp @@ -12,7 +12,7 @@ #include "lldb/API/SBStream.h" #include "lldb/Utility/Status.h" -#include <stdarg.h> +#include <cstdarg> using namespace lldb; using namespace lldb_private; diff --git a/lldb/source/API/SBFileSpec.cpp b/lldb/source/API/SBFileSpec.cpp index 7bfb665..0a6b63b 100644 --- a/lldb/source/API/SBFileSpec.cpp +++ b/lldb/source/API/SBFileSpec.cpp @@ -17,8 +17,8 @@ #include "llvm/ADT/SmallString.h" -#include <inttypes.h> -#include <limits.h> +#include <cinttypes> +#include <climits> using namespace lldb; using namespace lldb_private; diff --git a/lldb/source/API/SBFileSpecList.cpp b/lldb/source/API/SBFileSpecList.cpp index 7afa343..768ff0a 100644 --- a/lldb/source/API/SBFileSpecList.cpp +++ b/lldb/source/API/SBFileSpecList.cpp @@ -16,7 +16,7 @@ #include "lldb/Utility/FileSpec.h" #include "lldb/Utility/Stream.h" -#include <limits.h> +#include <climits> using namespace lldb; using namespace lldb_private; diff --git a/lldb/source/API/SBLineEntry.cpp b/lldb/source/API/SBLineEntry.cpp index 9866acb..29ffda9 100644 --- a/lldb/source/API/SBLineEntry.cpp +++ b/lldb/source/API/SBLineEntry.cpp @@ -14,7 +14,7 @@ #include "lldb/Symbol/LineEntry.h" #include "lldb/Utility/StreamString.h" -#include <limits.h> +#include <climits> using namespace lldb; using namespace lldb_private; diff --git a/lldb/source/API/SBProcess.cpp b/lldb/source/API/SBProcess.cpp index d7b7fd7..be20e8f 100644 --- a/lldb/source/API/SBProcess.cpp +++ b/lldb/source/API/SBProcess.cpp @@ -9,7 +9,7 @@ #include "lldb/API/SBProcess.h" #include "SBReproducerPrivate.h" -#include <inttypes.h> +#include <cinttypes> #include "lldb/lldb-defines.h" #include "lldb/lldb-types.h" diff --git a/lldb/source/API/SBQueue.cpp b/lldb/source/API/SBQueue.cpp index 2e65713..75674db 100644 --- a/lldb/source/API/SBQueue.cpp +++ b/lldb/source/API/SBQueue.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include <inttypes.h> +#include <cinttypes> #include "SBReproducerPrivate.h" #include "lldb/API/SBQueue.h" diff --git a/lldb/source/Breakpoint/BreakpointID.cpp b/lldb/source/Breakpoint/BreakpointID.cpp index a37abcf..f205721 100644 --- a/lldb/source/Breakpoint/BreakpointID.cpp +++ b/lldb/source/Breakpoint/BreakpointID.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include <stdio.h> +#include <cstdio> #include "lldb/Breakpoint/Breakpoint.h" #include "lldb/Breakpoint/BreakpointID.h" diff --git a/lldb/source/Breakpoint/BreakpointSite.cpp b/lldb/source/Breakpoint/BreakpointSite.cpp index fb3f0cd..1a4c1a7 100644 --- a/lldb/source/Breakpoint/BreakpointSite.cpp +++ b/lldb/source/Breakpoint/BreakpointSite.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include <inttypes.h> +#include <cinttypes> #include "lldb/Breakpoint/BreakpointSite.h" diff --git a/lldb/source/Core/Address.cpp b/lldb/source/Core/Address.cpp index 6079d0e..f0c7e2b 100644 --- a/lldb/source/Core/Address.cpp +++ b/lldb/source/Core/Address.cpp @@ -43,9 +43,9 @@ #include <memory> #include <vector> -#include <assert.h> -#include <inttypes.h> -#include <string.h> +#include <cassert> +#include <cinttypes> +#include <cstring> namespace lldb_private { class CompileUnit; diff --git a/lldb/source/Core/AddressRange.cpp b/lldb/source/Core/AddressRange.cpp index aeb99f8..7f3162a 100644 --- a/lldb/source/Core/AddressRange.cpp +++ b/lldb/source/Core/AddressRange.cpp @@ -19,7 +19,7 @@ #include <memory> -#include <inttypes.h> +#include <cinttypes> namespace lldb_private { class SectionList; diff --git a/lldb/source/Core/AddressResolverFileLine.cpp b/lldb/source/Core/AddressResolverFileLine.cpp index 8137eb0..6354792 100644 --- a/lldb/source/Core/AddressResolverFileLine.cpp +++ b/lldb/source/Core/AddressResolverFileLine.cpp @@ -21,7 +21,7 @@ #include "lldb/lldb-enumerations.h" #include "lldb/lldb-types.h" -#include <inttypes.h> +#include <cinttypes> #include <vector> using namespace lldb; diff --git a/lldb/source/Core/Communication.cpp b/lldb/source/Core/Communication.cpp index b50cd0e..5640e05 100644 --- a/lldb/source/Core/Communication.cpp +++ b/lldb/source/Core/Communication.cpp @@ -27,9 +27,9 @@ #include <cstring> #include <memory> -#include <errno.h> -#include <inttypes.h> -#include <stdio.h> +#include <cerrno> +#include <cinttypes> +#include <cstdio> using namespace lldb; using namespace lldb_private; diff --git a/lldb/source/Core/Debugger.cpp b/lldb/source/Core/Debugger.cpp index d3b2cc6..735e6f4 100644 --- a/lldb/source/Core/Debugger.cpp +++ b/lldb/source/Core/Debugger.cpp @@ -64,13 +64,13 @@ #include "llvm/Support/Threading.h" #include "llvm/Support/raw_ostream.h" +#include <cstdio> +#include <cstdlib> +#include <cstring> #include <list> #include <memory> #include <mutex> #include <set> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> #include <string> #include <system_error> diff --git a/lldb/source/Core/Disassembler.cpp b/lldb/source/Core/Disassembler.cpp index 60c41e1..704b3df 100644 --- a/lldb/source/Core/Disassembler.cpp +++ b/lldb/source/Core/Disassembler.cpp @@ -48,7 +48,7 @@ #include <cstring> #include <utility> -#include <assert.h> +#include <cassert> #define DEFAULT_DISASM_BYTE_SIZE 32 diff --git a/lldb/source/Core/DumpDataExtractor.cpp b/lldb/source/Core/DumpDataExtractor.cpp index 63e2cf2..66fcfbd 100644 --- a/lldb/source/Core/DumpDataExtractor.cpp +++ b/lldb/source/Core/DumpDataExtractor.cpp @@ -34,9 +34,9 @@ #include <memory> #include <string> -#include <assert.h> -#include <ctype.h> -#include <inttypes.h> +#include <cassert> +#include <cctype> +#include <cinttypes> #include <cmath> #include <bitset> diff --git a/lldb/source/Core/DynamicLoader.cpp b/lldb/source/Core/DynamicLoader.cpp index 22cb9f1..10d2b72 100644 --- a/lldb/source/Core/DynamicLoader.cpp +++ b/lldb/source/Core/DynamicLoader.cpp @@ -24,7 +24,7 @@ #include <memory> -#include <assert.h> +#include <cassert> using namespace lldb; using namespace lldb_private; diff --git a/lldb/source/Core/EmulateInstruction.cpp b/lldb/source/Core/EmulateInstruction.cpp index f7f56e9..9b91114 100644 --- a/lldb/source/Core/EmulateInstruction.cpp +++ b/lldb/source/Core/EmulateInstruction.cpp @@ -30,8 +30,8 @@ #include <cstring> #include <memory> -#include <inttypes.h> -#include <stdio.h> +#include <cinttypes> +#include <cstdio> namespace lldb_private { class Target; diff --git a/lldb/source/Core/FileSpecList.cpp b/lldb/source/Core/FileSpecList.cpp index 3ada7b4..1a1cf28 100644 --- a/lldb/source/Core/FileSpecList.cpp +++ b/lldb/source/Core/FileSpecList.cpp @@ -13,7 +13,7 @@ #include <utility> -#include <stdint.h> +#include <cstdint> using namespace lldb_private; using namespace std; diff --git a/lldb/source/Core/FormatEntity.cpp b/lldb/source/Core/FormatEntity.cpp index 77b6b16..6e6255b 100644 --- a/lldb/source/Core/FormatEntity.cpp +++ b/lldb/source/Core/FormatEntity.cpp @@ -59,12 +59,12 @@ #include "llvm/ADT/Triple.h" #include "llvm/Support/Compiler.h" -#include <ctype.h> -#include <inttypes.h> +#include <cctype> +#include <cinttypes> +#include <cstdio> +#include <cstdlib> +#include <cstring> #include <memory> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> #include <type_traits> #include <utility> diff --git a/lldb/source/Core/IOHandler.cpp b/lldb/source/Core/IOHandler.cpp index 22c39ef..c6f05d4 100644 --- a/lldb/source/Core/IOHandler.cpp +++ b/lldb/source/Core/IOHandler.cpp @@ -38,13 +38,13 @@ #include <memory> #include <mutex> -#include <assert.h> -#include <ctype.h> -#include <errno.h> -#include <locale.h> -#include <stdint.h> -#include <stdio.h> -#include <string.h> +#include <cassert> +#include <cctype> +#include <cerrno> +#include <clocale> +#include <cstdint> +#include <cstdio> +#include <cstring> #include <type_traits> using namespace lldb; diff --git a/lldb/source/Core/IOHandlerCursesGUI.cpp b/lldb/source/Core/IOHandlerCursesGUI.cpp index 1de83d8..112c257 100644 --- a/lldb/source/Core/IOHandlerCursesGUI.cpp +++ b/lldb/source/Core/IOHandlerCursesGUI.cpp @@ -64,13 +64,13 @@ #include <memory> #include <mutex> -#include <assert.h> -#include <ctype.h> -#include <errno.h> -#include <locale.h> -#include <stdint.h> -#include <stdio.h> -#include <string.h> +#include <cassert> +#include <cctype> +#include <cerrno> +#include <clocale> +#include <cstdint> +#include <cstdio> +#include <cstring> #include <type_traits> using namespace lldb; diff --git a/lldb/source/Core/Mangled.cpp b/lldb/source/Core/Mangled.cpp index 627be94..3919cb4 100644 --- a/lldb/source/Core/Mangled.cpp +++ b/lldb/source/Core/Mangled.cpp @@ -27,8 +27,8 @@ #include <string> #include <utility> -#include <stdlib.h> -#include <string.h> +#include <cstdlib> +#include <cstring> using namespace lldb_private; static inline bool cstring_is_mangled(llvm::StringRef s) { diff --git a/lldb/source/Core/Module.cpp b/lldb/source/Core/Module.cpp index 50a1f8d..117b0bf 100644 --- a/lldb/source/Core/Module.cpp +++ b/lldb/source/Core/Module.cpp @@ -59,12 +59,12 @@ #include "llvm/Support/Signals.h" #include "llvm/Support/raw_ostream.h" -#include <assert.h> +#include <cassert> +#include <cinttypes> +#include <cstdarg> #include <cstdint> -#include <inttypes.h> +#include <cstring> #include <map> -#include <stdarg.h> -#include <string.h> #include <type_traits> #include <utility> diff --git a/lldb/source/Core/Opcode.cpp b/lldb/source/Core/Opcode.cpp index b544064..a3fc97f 100644 --- a/lldb/source/Core/Opcode.cpp +++ b/lldb/source/Core/Opcode.cpp @@ -16,7 +16,7 @@ #include <memory> -#include <inttypes.h> +#include <cinttypes> using namespace lldb; using namespace lldb_private; diff --git a/lldb/source/Core/PluginManager.cpp b/lldb/source/Core/PluginManager.cpp index a826e12..a224ba1 100644 --- a/lldb/source/Core/PluginManager.cpp +++ b/lldb/source/Core/PluginManager.cpp @@ -20,7 +20,7 @@ #include "llvm/Support/DynamicLibrary.h" #include "llvm/Support/FileSystem.h" #include "llvm/Support/raw_ostream.h" -#include <assert.h> +#include <cassert> #include <map> #include <memory> #include <mutex> diff --git a/lldb/source/Core/SearchFilter.cpp b/lldb/source/Core/SearchFilter.cpp index e3327ff..4f9519b 100644 --- a/lldb/source/Core/SearchFilter.cpp +++ b/lldb/source/Core/SearchFilter.cpp @@ -27,8 +27,8 @@ #include <mutex> #include <string> -#include <inttypes.h> -#include <string.h> +#include <cinttypes> +#include <cstring> namespace lldb_private { class Address; diff --git a/lldb/source/Core/Section.cpp b/lldb/source/Core/Section.cpp index 9bf1c62..a5a1014 100644 --- a/lldb/source/Core/Section.cpp +++ b/lldb/source/Core/Section.cpp @@ -15,7 +15,7 @@ #include "lldb/Utility/FileSpec.h" #include "lldb/Utility/VMRange.h" -#include <inttypes.h> +#include <cinttypes> #include <limits> #include <utility> diff --git a/lldb/source/Core/SourceManager.cpp b/lldb/source/Core/SourceManager.cpp index e79fcb4..691bda6 100644 --- a/lldb/source/Core/SourceManager.cpp +++ b/lldb/source/Core/SourceManager.cpp @@ -35,8 +35,8 @@ #include <memory> #include <utility> -#include <assert.h> -#include <stdio.h> +#include <cassert> +#include <cstdio> namespace lldb_private { class ExecutionContext; diff --git a/lldb/source/Core/StreamFile.cpp b/lldb/source/Core/StreamFile.cpp index 43a9df8..d736dfd 100644 --- a/lldb/source/Core/StreamFile.cpp +++ b/lldb/source/Core/StreamFile.cpp @@ -10,7 +10,7 @@ #include "lldb/Host/FileSystem.h" #include "lldb/Utility/Log.h" -#include <stdio.h> +#include <cstdio> using namespace lldb; using namespace lldb_private; diff --git a/lldb/source/Core/Value.cpp b/lldb/source/Core/Value.cpp index b5af03c..6ce01d8 100644 --- a/lldb/source/Core/Value.cpp +++ b/lldb/source/Core/Value.cpp @@ -33,7 +33,7 @@ #include <memory> #include <string> -#include <inttypes.h> +#include <cinttypes> using namespace lldb; using namespace lldb_private; diff --git a/lldb/source/Core/ValueObject.cpp b/lldb/source/Core/ValueObject.cpp index 83c2098..a6020d2 100644 --- a/lldb/source/Core/ValueObject.cpp +++ b/lldb/source/Core/ValueObject.cpp @@ -57,10 +57,10 @@ #include <memory> #include <tuple> -#include <assert.h> -#include <inttypes.h> -#include <stdio.h> -#include <string.h> +#include <cassert> +#include <cinttypes> +#include <cstdio> +#include <cstring> #include <lldb/Core/ValueObject.h> diff --git a/lldb/source/Core/ValueObjectChild.cpp b/lldb/source/Core/ValueObjectChild.cpp index 60d1b2e..b26a0aa 100644 --- a/lldb/source/Core/ValueObjectChild.cpp +++ b/lldb/source/Core/ValueObjectChild.cpp @@ -21,8 +21,8 @@ #include <memory> #include <vector> -#include <stdio.h> -#include <string.h> +#include <cstdio> +#include <cstring> using namespace lldb_private; diff --git a/lldb/source/Core/ValueObjectDynamicValue.cpp b/lldb/source/Core/ValueObjectDynamicValue.cpp index 1c25b8c..d775094 100644 --- a/lldb/source/Core/ValueObjectDynamicValue.cpp +++ b/lldb/source/Core/ValueObjectDynamicValue.cpp @@ -22,7 +22,7 @@ #include "lldb/Utility/Status.h" #include "lldb/lldb-types.h" -#include <string.h> +#include <cstring> namespace lldb_private { class Declaration; } diff --git a/lldb/source/Core/ValueObjectMemory.cpp b/lldb/source/Core/ValueObjectMemory.cpp index e3f9668b..badc22e 100644 --- a/lldb/source/Core/ValueObjectMemory.cpp +++ b/lldb/source/Core/ValueObjectMemory.cpp @@ -18,7 +18,7 @@ #include "lldb/lldb-types.h" #include "llvm/Support/ErrorHandling.h" -#include <assert.h> +#include <cassert> #include <memory> namespace lldb_private { diff --git a/lldb/source/Core/ValueObjectRegister.cpp b/lldb/source/Core/ValueObjectRegister.cpp index 1abba1a..38bbe26 100644 --- a/lldb/source/Core/ValueObjectRegister.cpp +++ b/lldb/source/Core/ValueObjectRegister.cpp @@ -25,7 +25,7 @@ #include "llvm/ADT/StringRef.h" -#include <assert.h> +#include <cassert> #include <memory> namespace lldb_private { diff --git a/lldb/source/Core/ValueObjectVariable.cpp b/lldb/source/Core/ValueObjectVariable.cpp index 751b502..87e4db5 100644 --- a/lldb/source/Core/ValueObjectVariable.cpp +++ b/lldb/source/Core/ValueObjectVariable.cpp @@ -33,7 +33,7 @@ #include "llvm/ADT/StringRef.h" -#include <assert.h> +#include <cassert> #include <memory> namespace lldb_private { diff --git a/lldb/source/DataFormatters/StringPrinter.cpp b/lldb/source/DataFormatters/StringPrinter.cpp index 139f1ec..0c6438f 100644 --- a/lldb/source/DataFormatters/StringPrinter.cpp +++ b/lldb/source/DataFormatters/StringPrinter.cpp @@ -18,7 +18,7 @@ #include "llvm/ADT/StringExtras.h" #include "llvm/Support/ConvertUTF.h" -#include <ctype.h> +#include <cctype> #include <locale> #include <memory> diff --git a/lldb/source/Expression/DWARFExpression.cpp b/lldb/source/Expression/DWARFExpression.cpp index 776d7f2..75bad04 100644 --- a/lldb/source/Expression/DWARFExpression.cpp +++ b/lldb/source/Expression/DWARFExpression.cpp @@ -8,7 +8,7 @@ #include "lldb/Expression/DWARFExpression.h" -#include <inttypes.h> +#include <cinttypes> #include <vector> diff --git a/lldb/source/Expression/UserExpression.cpp b/lldb/source/Expression/UserExpression.cpp index 6d39950..bf44f1b 100644 --- a/lldb/source/Expression/UserExpression.cpp +++ b/lldb/source/Expression/UserExpression.cpp @@ -8,7 +8,7 @@ #include "lldb/Host/Config.h" -#include <stdio.h> +#include <cstdio> #if HAVE_SYS_TYPES_H #include <sys/types.h> #endif diff --git a/lldb/source/Expression/UtilityFunction.cpp b/lldb/source/Expression/UtilityFunction.cpp index 7ad25f5..d7a89a8 100644 --- a/lldb/source/Expression/UtilityFunction.cpp +++ b/lldb/source/Expression/UtilityFunction.cpp @@ -8,7 +8,7 @@ #include "lldb/Host/Config.h" -#include <stdio.h> +#include <cstdio> #if HAVE_SYS_TYPES_H #include <sys/types.h> #endif diff --git a/lldb/source/Host/android/LibcGlue.cpp b/lldb/source/Host/android/LibcGlue.cpp index f7e0bf3..877d735 100644 --- a/lldb/source/Host/android/LibcGlue.cpp +++ b/lldb/source/Host/android/LibcGlue.cpp @@ -14,8 +14,8 @@ #if __ANDROID_API__ < 21 +#include <csignal> #include <fcntl.h> -#include <signal.h> #include <sys/stat.h> #include <sys/types.h> diff --git a/lldb/source/Host/common/Editline.cpp b/lldb/source/Host/common/Editline.cpp index 2cfcf2a..a5598c3 100644 --- a/lldb/source/Host/common/Editline.cpp +++ b/lldb/source/Host/common/Editline.cpp @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// +#include <climits> #include <iomanip> -#include <limits.h> #include "lldb/Host/Editline.h" diff --git a/lldb/source/Host/common/File.cpp b/lldb/source/Host/common/File.cpp index a5b9709..e302e0a 100644 --- a/lldb/source/Host/common/File.cpp +++ b/lldb/source/Host/common/File.cpp @@ -8,11 +8,11 @@ #include "lldb/Host/File.h" -#include <errno.h> +#include <cerrno> +#include <climits> +#include <cstdarg> +#include <cstdio> #include <fcntl.h> -#include <limits.h> -#include <stdarg.h> -#include <stdio.h> #ifdef _WIN32 #include "lldb/Host/windows/windows.h" diff --git a/lldb/source/Host/common/FileSystem.cpp b/lldb/source/Host/common/FileSystem.cpp index 9076188..a2c3b35 100644 --- a/lldb/source/Host/common/FileSystem.cpp +++ b/lldb/source/Host/common/FileSystem.cpp @@ -19,11 +19,11 @@ #include "llvm/Support/Program.h" #include "llvm/Support/Threading.h" -#include <errno.h> +#include <cerrno> +#include <climits> +#include <cstdarg> +#include <cstdio> #include <fcntl.h> -#include <limits.h> -#include <stdarg.h> -#include <stdio.h> #ifdef _WIN32 #include "lldb/Host/windows/windows.h" diff --git a/lldb/source/Host/common/GetOptInc.cpp b/lldb/source/Host/common/GetOptInc.cpp index 62ce742..c2044b6 100644 --- a/lldb/source/Host/common/GetOptInc.cpp +++ b/lldb/source/Host/common/GetOptInc.cpp @@ -12,9 +12,9 @@ defined(REPLACE_GETOPT_LONG_ONLY) // getopt.cpp -#include <errno.h> -#include <stdlib.h> -#include <string.h> +#include <cerrno> +#include <cstdlib> +#include <cstring> #if defined(REPLACE_GETOPT) int opterr = 1; /* if error message should be printed */ diff --git a/lldb/source/Host/common/Host.cpp b/lldb/source/Host/common/Host.cpp index 9931666..ad7743c 100644 --- a/lldb/source/Host/common/Host.cpp +++ b/lldb/source/Host/common/Host.cpp @@ -7,9 +7,9 @@ //===----------------------------------------------------------------------===// // C includes -#include <errno.h> -#include <limits.h> -#include <stdlib.h> +#include <cerrno> +#include <climits> +#include <cstdlib> #include <sys/types.h> #ifndef _WIN32 #include <dlfcn.h> diff --git a/lldb/source/Host/common/MainLoop.cpp b/lldb/source/Host/common/MainLoop.cpp index cdcb052..d36587c 100644 --- a/lldb/source/Host/common/MainLoop.cpp +++ b/lldb/source/Host/common/MainLoop.cpp @@ -16,7 +16,7 @@ #include <cassert> #include <cerrno> #include <csignal> -#include <time.h> +#include <ctime> #include <vector> // Multiplexing is implemented using kqueue on systems that support it (BSD diff --git a/lldb/source/Host/common/ProcessLaunchInfo.cpp b/lldb/source/Host/common/ProcessLaunchInfo.cpp index d42687e..8becd5a 100644 --- a/lldb/source/Host/common/ProcessLaunchInfo.cpp +++ b/lldb/source/Host/common/ProcessLaunchInfo.cpp @@ -20,7 +20,7 @@ #include "llvm/Support/FileSystem.h" #if !defined(_WIN32) -#include <limits.h> +#include <climits> #endif using namespace lldb; diff --git a/lldb/source/Host/common/PseudoTerminal.cpp b/lldb/source/Host/common/PseudoTerminal.cpp index de76e8a..ce062af 100644 --- a/lldb/source/Host/common/PseudoTerminal.cpp +++ b/lldb/source/Host/common/PseudoTerminal.cpp @@ -11,11 +11,11 @@ #include "llvm/Support/Errc.h" #include "llvm/Support/Errno.h" #include <cassert> -#include <limits.h> +#include <climits> +#include <cstdio> +#include <cstdlib> +#include <cstring> #include <mutex> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> #if defined(TIOCSCTTY) #include <sys/ioctl.h> #endif diff --git a/lldb/source/Host/common/Socket.cpp b/lldb/source/Host/common/Socket.cpp index 4bcf34a..d1c327d 100644 --- a/lldb/source/Host/common/Socket.cpp +++ b/lldb/source/Host/common/Socket.cpp @@ -41,9 +41,9 @@ #ifdef __ANDROID__ #include <arpa/inet.h> #include <asm-generic/errno-base.h> -#include <errno.h> -#include <linux/tcp.h> +#include <cerrno> #include <fcntl.h> +#include <linux/tcp.h> #include <sys/syscall.h> #include <unistd.h> #endif // __ANDROID__ diff --git a/lldb/source/Host/common/SocketAddress.cpp b/lldb/source/Host/common/SocketAddress.cpp index e98944d..25f95b7 100644 --- a/lldb/source/Host/common/SocketAddress.cpp +++ b/lldb/source/Host/common/SocketAddress.cpp @@ -17,15 +17,15 @@ #endif #include "lldb/Host/SocketAddress.h" -#include <stddef.h> -#include <stdio.h> +#include <cstddef> +#include <cstdio> #if !defined(_WIN32) #include <arpa/inet.h> #endif -#include <assert.h> -#include <string.h> +#include <cassert> +#include <cstring> #include "lldb/Host/PosixApi.h" diff --git a/lldb/source/Host/common/StringConvert.cpp b/lldb/source/Host/common/StringConvert.cpp index e5f05e6..b4eb927 100644 --- a/lldb/source/Host/common/StringConvert.cpp +++ b/lldb/source/Host/common/StringConvert.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include <stdlib.h> +#include <cstdlib> #include "lldb/Host/StringConvert.h" diff --git a/lldb/source/Host/common/Terminal.cpp b/lldb/source/Host/common/Terminal.cpp index 9990dbf..c9999bd 100644 --- a/lldb/source/Host/common/Terminal.cpp +++ b/lldb/source/Host/common/Terminal.cpp @@ -12,8 +12,8 @@ #include "lldb/Host/PosixApi.h" #include "llvm/ADT/STLExtras.h" +#include <csignal> #include <fcntl.h> -#include <signal.h> #if LLDB_ENABLE_TERMIOS #include <termios.h> diff --git a/lldb/source/Host/freebsd/Host.cpp b/lldb/source/Host/freebsd/Host.cpp index c0cc74a..f935816 100644 --- a/lldb/source/Host/freebsd/Host.cpp +++ b/lldb/source/Host/freebsd/Host.cpp @@ -16,9 +16,9 @@ #include <machine/elf.h> +#include <cstdio> #include <dlfcn.h> #include <execinfo.h> -#include <stdio.h> #include "lldb/Host/Host.h" #include "lldb/Host/HostInfo.h" diff --git a/lldb/source/Host/freebsd/HostInfoFreeBSD.cpp b/lldb/source/Host/freebsd/HostInfoFreeBSD.cpp index 2db97db..1b9e3cc 100644 --- a/lldb/source/Host/freebsd/HostInfoFreeBSD.cpp +++ b/lldb/source/Host/freebsd/HostInfoFreeBSD.cpp @@ -8,8 +8,8 @@ #include "lldb/Host/freebsd/HostInfoFreeBSD.h" -#include <stdio.h> -#include <string.h> +#include <cstdio> +#include <cstring> #include <sys/sysctl.h> #include <sys/types.h> #include <sys/utsname.h> diff --git a/lldb/source/Host/linux/Host.cpp b/lldb/source/Host/linux/Host.cpp index 334634a..dabebf5 100644 --- a/lldb/source/Host/linux/Host.cpp +++ b/lldb/source/Host/linux/Host.cpp @@ -6,11 +6,11 @@ // //===----------------------------------------------------------------------===// +#include <cerrno> +#include <cstdio> +#include <cstring> #include <dirent.h> -#include <errno.h> #include <fcntl.h> -#include <stdio.h> -#include <string.h> #include <sys/stat.h> #include <sys/types.h> #include <sys/utsname.h> diff --git a/lldb/source/Host/linux/HostInfoLinux.cpp b/lldb/source/Host/linux/HostInfoLinux.cpp index 9e8a00f..5f314cc 100644 --- a/lldb/source/Host/linux/HostInfoLinux.cpp +++ b/lldb/source/Host/linux/HostInfoLinux.cpp @@ -13,9 +13,9 @@ #include "llvm/Support/Threading.h" -#include <limits.h> -#include <stdio.h> -#include <string.h> +#include <climits> +#include <cstdio> +#include <cstring> #include <sys/utsname.h> #include <unistd.h> diff --git a/lldb/source/Host/macosx/cfcpp/CFCReleaser.h b/lldb/source/Host/macosx/cfcpp/CFCReleaser.h index 23e6073..cef7748 100644 --- a/lldb/source/Host/macosx/cfcpp/CFCReleaser.h +++ b/lldb/source/Host/macosx/cfcpp/CFCReleaser.h @@ -13,7 +13,7 @@ #ifdef __cplusplus -#include <assert.h> +#include <cassert> // Templatized CF helper class that can own any CF pointer and will // call CFRelease() on any valid pointer it owns unless that pointer is diff --git a/lldb/source/Host/macosx/objcxx/Host.mm b/lldb/source/Host/macosx/objcxx/Host.mm index 907be0a..7225979 100644 --- a/lldb/source/Host/macosx/objcxx/Host.mm +++ b/lldb/source/Host/macosx/objcxx/Host.mm @@ -38,13 +38,13 @@ #include <asl.h> #include <crt_externs.h> +#include <cstdio> +#include <cstdlib> #include <dlfcn.h> #include <grp.h> #include <libproc.h> #include <pwd.h> #include <spawn.h> -#include <stdio.h> -#include <stdlib.h> #include <sys/proc.h> #include <sys/stat.h> #include <sys/sysctl.h> diff --git a/lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm b/lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm index 7292451..4c396c3 100644 --- a/lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm +++ b/lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm @@ -25,7 +25,7 @@ #include <string> // C inclues -#include <stdlib.h> +#include <cstdlib> #include <sys/sysctl.h> #include <sys/syslimits.h> #include <sys/types.h> diff --git a/lldb/source/Host/netbsd/HostInfoNetBSD.cpp b/lldb/source/Host/netbsd/HostInfoNetBSD.cpp index cc01ec3..bddd46c 100644 --- a/lldb/source/Host/netbsd/HostInfoNetBSD.cpp +++ b/lldb/source/Host/netbsd/HostInfoNetBSD.cpp @@ -8,11 +8,11 @@ #include "lldb/Host/netbsd/HostInfoNetBSD.h" -#include <inttypes.h> -#include <limits.h> +#include <cinttypes> +#include <climits> +#include <cstdio> +#include <cstring> #include <pthread.h> -#include <stdio.h> -#include <string.h> #include <sys/sysctl.h> #include <sys/types.h> #include <sys/utsname.h> diff --git a/lldb/source/Host/netbsd/HostNetBSD.cpp b/lldb/source/Host/netbsd/HostNetBSD.cpp index 1945f9f..af31a11 100644 --- a/lldb/source/Host/netbsd/HostNetBSD.cpp +++ b/lldb/source/Host/netbsd/HostNetBSD.cpp @@ -6,14 +6,14 @@ // //===----------------------------------------------------------------------===// +#include <cstdio> #include <dlfcn.h> #include <execinfo.h> -#include <stdio.h> #include <sys/proc.h> #include <sys/sysctl.h> #include <sys/types.h> -#include <limits.h> +#include <climits> #include <kvm.h> #include <sys/exec.h> diff --git a/lldb/source/Host/openbsd/Host.cpp b/lldb/source/Host/openbsd/Host.cpp index 4ce5495..799a61a 100644 --- a/lldb/source/Host/openbsd/Host.cpp +++ b/lldb/source/Host/openbsd/Host.cpp @@ -15,7 +15,7 @@ #include <sys/sysctl.h> #include <sys/user.h> -#include <stdio.h> +#include <cstdio> #include "lldb/Host/Host.h" #include "lldb/Host/HostInfo.h" diff --git a/lldb/source/Host/openbsd/HostInfoOpenBSD.cpp b/lldb/source/Host/openbsd/HostInfoOpenBSD.cpp index 58836333..9617375 100644 --- a/lldb/source/Host/openbsd/HostInfoOpenBSD.cpp +++ b/lldb/source/Host/openbsd/HostInfoOpenBSD.cpp @@ -8,8 +8,8 @@ #include "lldb/Host/openbsd/HostInfoOpenBSD.h" -#include <stdio.h> -#include <string.h> +#include <cstdio> +#include <cstring> #include <sys/sysctl.h> #include <sys/types.h> #include <sys/utsname.h> diff --git a/lldb/source/Host/posix/ConnectionFileDescriptorPosix.cpp b/lldb/source/Host/posix/ConnectionFileDescriptorPosix.cpp index 3a547ce..548a376 100644 --- a/lldb/source/Host/posix/ConnectionFileDescriptorPosix.cpp +++ b/lldb/source/Host/posix/ConnectionFileDescriptorPosix.cpp @@ -20,10 +20,10 @@ #include "lldb/Utility/SelectHelper.h" #include "lldb/Utility/Timeout.h" -#include <errno.h> +#include <cerrno> +#include <cstdlib> +#include <cstring> #include <fcntl.h> -#include <stdlib.h> -#include <string.h> #include <sys/types.h> #if LLDB_ENABLE_POSIX diff --git a/lldb/source/Host/posix/DomainSocket.cpp b/lldb/source/Host/posix/DomainSocket.cpp index 5a39690..7322b15 100644 --- a/lldb/source/Host/posix/DomainSocket.cpp +++ b/lldb/source/Host/posix/DomainSocket.cpp @@ -11,7 +11,7 @@ #include "llvm/Support/Errno.h" #include "llvm/Support/FileSystem.h" -#include <stddef.h> +#include <cstddef> #include <sys/socket.h> #include <sys/un.h> diff --git a/lldb/source/Host/posix/HostInfoPosix.cpp b/lldb/source/Host/posix/HostInfoPosix.cpp index 7e110f0..b633acf 100644 --- a/lldb/source/Host/posix/HostInfoPosix.cpp +++ b/lldb/source/Host/posix/HostInfoPosix.cpp @@ -15,11 +15,11 @@ #include "llvm/Support/Path.h" #include "llvm/Support/raw_ostream.h" +#include <climits> +#include <cstdlib> #include <grp.h> -#include <limits.h> #include <mutex> #include <pwd.h> -#include <stdlib.h> #include <sys/types.h> #include <unistd.h> diff --git a/lldb/source/Host/posix/HostProcessPosix.cpp b/lldb/source/Host/posix/HostProcessPosix.cpp index 69a049b..8fd3a44 100644 --- a/lldb/source/Host/posix/HostProcessPosix.cpp +++ b/lldb/source/Host/posix/HostProcessPosix.cpp @@ -12,8 +12,8 @@ #include "llvm/ADT/STLExtras.h" +#include <climits> #include <csignal> -#include <limits.h> #include <unistd.h> using namespace lldb_private; diff --git a/lldb/source/Host/posix/HostThreadPosix.cpp b/lldb/source/Host/posix/HostThreadPosix.cpp index 31c7c7f..fcb8805 100644 --- a/lldb/source/Host/posix/HostThreadPosix.cpp +++ b/lldb/source/Host/posix/HostThreadPosix.cpp @@ -9,7 +9,7 @@ #include "lldb/Host/posix/HostThreadPosix.h" #include "lldb/Utility/Status.h" -#include <errno.h> +#include <cerrno> #include <pthread.h> using namespace lldb; diff --git a/lldb/source/Host/posix/PipePosix.cpp b/lldb/source/Host/posix/PipePosix.cpp index 2ccf000..a8cce57 100644 --- a/lldb/source/Host/posix/PipePosix.cpp +++ b/lldb/source/Host/posix/PipePosix.cpp @@ -15,9 +15,9 @@ #include <functional> #include <thread> -#include <errno.h> +#include <cerrno> +#include <climits> #include <fcntl.h> -#include <limits.h> #include <sys/stat.h> #include <sys/types.h> #include <unistd.h> diff --git a/lldb/source/Host/posix/ProcessLauncherPosixFork.cpp b/lldb/source/Host/posix/ProcessLauncherPosixFork.cpp index 3548234..25dcf1e 100644 --- a/lldb/source/Host/posix/ProcessLauncherPosixFork.cpp +++ b/lldb/source/Host/posix/ProcessLauncherPosixFork.cpp @@ -15,7 +15,7 @@ #include "lldb/Utility/Log.h" #include "llvm/Support/Errno.h" -#include <limits.h> +#include <climits> #include <sys/ptrace.h> #include <sys/wait.h> #include <unistd.h> diff --git a/lldb/source/Host/windows/Host.cpp b/lldb/source/Host/windows/Host.cpp index 50617a8..f663b35 100644 --- a/lldb/source/Host/windows/Host.cpp +++ b/lldb/source/Host/windows/Host.cpp @@ -8,7 +8,7 @@ #include "lldb/Host/windows/AutoHandle.h" #include "lldb/Host/windows/windows.h" -#include <stdio.h> +#include <cstdio> #include "lldb/Host/FileSystem.h" #include "lldb/Host/Host.h" diff --git a/lldb/source/Host/windows/Windows.cpp b/lldb/source/Host/windows/Windows.cpp index 4e6437f..787f359 100644 --- a/lldb/source/Host/windows/Windows.cpp +++ b/lldb/source/Host/windows/Windows.cpp @@ -13,14 +13,14 @@ #include "llvm/Support/ConvertUTF.h" -#include <assert.h> +#include <cassert> +#include <cctype> #include <cerrno> -#include <ctype.h> +#include <cstdarg> +#include <cstdio> +#include <cstdlib> +#include <cstring> #include <io.h> -#include <stdarg.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> int vasprintf(char **ret, const char *fmt, va_list ap) { char *buf; diff --git a/lldb/source/Interpreter/CommandHistory.cpp b/lldb/source/Interpreter/CommandHistory.cpp index ffdcbbf..8f39984 100644 --- a/lldb/source/Interpreter/CommandHistory.cpp +++ b/lldb/source/Interpreter/CommandHistory.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include <inttypes.h> +#include <cinttypes> #include "lldb/Interpreter/CommandHistory.h" diff --git a/lldb/source/Interpreter/CommandInterpreter.cpp b/lldb/source/Interpreter/CommandInterpreter.cpp index 8122084..3398ec2 100644 --- a/lldb/source/Interpreter/CommandInterpreter.cpp +++ b/lldb/source/Interpreter/CommandInterpreter.cpp @@ -6,9 +6,9 @@ // //===----------------------------------------------------------------------===// +#include <cstdlib> #include <limits> #include <memory> -#include <stdlib.h> #include <string> #include <vector> diff --git a/lldb/source/Interpreter/CommandObject.cpp b/lldb/source/Interpreter/CommandObject.cpp index 22effff..09a8b05 100644 --- a/lldb/source/Interpreter/CommandObject.cpp +++ b/lldb/source/Interpreter/CommandObject.cpp @@ -12,8 +12,8 @@ #include <sstream> #include <string> -#include <ctype.h> -#include <stdlib.h> +#include <cctype> +#include <cstdlib> #include "lldb/Core/Address.h" #include "lldb/Interpreter/Options.h" diff --git a/lldb/source/Interpreter/ScriptInterpreter.cpp b/lldb/source/Interpreter/ScriptInterpreter.cpp index d822ea2..2b70a91 100644 --- a/lldb/source/Interpreter/ScriptInterpreter.cpp +++ b/lldb/source/Interpreter/ScriptInterpreter.cpp @@ -18,9 +18,9 @@ #if defined(_WIN32) #include "lldb/Host/windows/ConnectionGenericFileWindows.h" #endif +#include <cstdio> +#include <cstdlib> #include <memory> -#include <stdio.h> -#include <stdlib.h> #include <string> using namespace lldb; diff --git a/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp b/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp index 575a882..c3ff9d8 100644 --- a/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp +++ b/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp @@ -35,7 +35,7 @@ //#define ENABLE_DEBUG_PRINTF // COMMENT THIS LINE OUT PRIOR TO CHECKIN #ifdef ENABLE_DEBUG_PRINTF -#include <stdio.h> +#include <cstdio> #define DEBUG_PRINTF(fmt, ...) printf(fmt, ##__VA_ARGS__) #else #define DEBUG_PRINTF(fmt, ...) diff --git a/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.cpp b/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.cpp index ac43112..eed0339 100644 --- a/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.cpp +++ b/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderDarwin.cpp @@ -36,7 +36,7 @@ //#define ENABLE_DEBUG_PRINTF // COMMENT THIS LINE OUT PRIOR TO CHECKIN #ifdef ENABLE_DEBUG_PRINTF -#include <stdio.h> +#include <cstdio> #define DEBUG_PRINTF(fmt, ...) printf(fmt, ##__VA_ARGS__) #else #define DEBUG_PRINTF(fmt, ...) diff --git a/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp b/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp index 6872dd7..91b1682 100644 --- a/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp +++ b/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp @@ -32,7 +32,7 @@ //#define ENABLE_DEBUG_PRINTF // COMMENT THIS LINE OUT PRIOR TO CHECKIN #ifdef ENABLE_DEBUG_PRINTF -#include <stdio.h> +#include <cstdio> #define DEBUG_PRINTF(fmt, ...) printf(fmt, ##__VA_ARGS__) #else #define DEBUG_PRINTF(fmt, ...) diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.cpp index 3edbc4a..1ab8daf 100644 --- a/lldb/source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.cpp +++ b/lldb/source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.cpp @@ -15,7 +15,6 @@ #include "lldb/Target/Target.h" #include "lldb/Utility/LLDBAssert.h" #include "lldb/Utility/Log.h" -#include "stdlib.h" #include "clang/AST/ASTContext.h" #include "clang/AST/Decl.h" #include "clang/AST/DeclCXX.h" @@ -27,6 +26,7 @@ #include "clang/Sema/SemaDiagnostic.h" #include "llvm/Support/Casting.h" #include "llvm/Support/raw_ostream.h" +#include <cstdlib> using namespace llvm; using namespace clang; diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ASTStructExtractor.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ASTStructExtractor.cpp index 40f0de4..81e3b27 100644 --- a/lldb/source/Plugins/ExpressionParser/Clang/ASTStructExtractor.cpp +++ b/lldb/source/Plugins/ExpressionParser/Clang/ASTStructExtractor.cpp @@ -9,7 +9,6 @@ #include "ASTStructExtractor.h" #include "lldb/Utility/Log.h" -#include "stdlib.h" #include "clang/AST/ASTContext.h" #include "clang/AST/Decl.h" #include "clang/AST/DeclCXX.h" @@ -21,6 +20,7 @@ #include "clang/Sema/Sema.h" #include "llvm/Support/Casting.h" #include "llvm/Support/raw_ostream.h" +#include <cstdlib> using namespace llvm; using namespace clang; diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.h b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.h index f1a0e21..e3d2f44 100644 --- a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.h +++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.h @@ -9,8 +9,8 @@ #ifndef LLDB_SOURCE_PLUGINS_EXPRESSIONPARSER_CLANG_CLANGEXPRESSIONDECLMAP_H #define LLDB_SOURCE_PLUGINS_EXPRESSIONPARSER_CLANG_CLANGEXPRESSIONDECLMAP_H -#include <signal.h> -#include <stdint.h> +#include <csignal> +#include <cstdint> #include <vector> diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.h b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.h index 58d5899..6bae52e 100644 --- a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.h +++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionVariable.h @@ -9,9 +9,9 @@ #ifndef LLDB_SOURCE_PLUGINS_EXPRESSIONPARSER_CLANG_CLANGEXPRESSIONVARIABLE_H #define LLDB_SOURCE_PLUGINS_EXPRESSIONPARSER_CLANG_CLANGEXPRESSIONVARIABLE_H -#include <signal.h> -#include <stdint.h> -#include <string.h> +#include <csignal> +#include <cstdint> +#include <cstring> #include <map> #include <string> diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp index d18b239..978eb7d 100644 --- a/lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp +++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp @@ -8,7 +8,7 @@ #include "lldb/Host/Config.h" -#include <stdio.h> +#include <cstdio> #if HAVE_SYS_TYPES_H #include <sys/types.h> #endif diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangUtilityFunction.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangUtilityFunction.cpp index 5d56bd7..39c6ad2 100644 --- a/lldb/source/Plugins/ExpressionParser/Clang/ClangUtilityFunction.cpp +++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangUtilityFunction.cpp @@ -14,7 +14,7 @@ #include "ClangExpressionSourceCode.h" #include "ClangPersistentVariables.h" -#include <stdio.h> +#include <cstdio> #if HAVE_SYS_TYPES_H #include <sys/types.h> #endif diff --git a/lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp b/lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp index 5559127..bf0bbda 100644 --- a/lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp +++ b/lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include <stdlib.h> +#include <cstdlib> #include "EmulateInstructionARM.h" #include "EmulationStateARM.h" diff --git a/lldb/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp b/lldb/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp index a266450..a1a93c0 100644 --- a/lldb/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp +++ b/lldb/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp @@ -8,7 +8,7 @@ #include "EmulateInstructionMIPS.h" -#include <stdlib.h> +#include <cstdlib> #include "lldb/Core/Address.h" #include "lldb/Core/Opcode.h" diff --git a/lldb/source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.cpp b/lldb/source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.cpp index 06ebe48..6044d00 100644 --- a/lldb/source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.cpp +++ b/lldb/source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.cpp @@ -8,7 +8,7 @@ #include "EmulateInstructionMIPS64.h" -#include <stdlib.h> +#include <cstdlib> #include "lldb/Core/Address.h" #include "lldb/Core/Opcode.h" diff --git a/lldb/source/Plugins/Instruction/PPC64/EmulateInstructionPPC64.cpp b/lldb/source/Plugins/Instruction/PPC64/EmulateInstructionPPC64.cpp index 5d97513..4e78c36 100644 --- a/lldb/source/Plugins/Instruction/PPC64/EmulateInstructionPPC64.cpp +++ b/lldb/source/Plugins/Instruction/PPC64/EmulateInstructionPPC64.cpp @@ -8,7 +8,7 @@ #include "EmulateInstructionPPC64.h" -#include <stdlib.h> +#include <cstdlib> #include "lldb/Core/PluginManager.h" #include "lldb/Symbol/UnwindPlan.h" diff --git a/lldb/source/Plugins/InstrumentationRuntime/UBSan/InstrumentationRuntimeUBSan.cpp b/lldb/source/Plugins/InstrumentationRuntime/UBSan/InstrumentationRuntimeUBSan.cpp index 5f27da6..58bc38a 100644 --- a/lldb/source/Plugins/InstrumentationRuntime/UBSan/InstrumentationRuntimeUBSan.cpp +++ b/lldb/source/Plugins/InstrumentationRuntime/UBSan/InstrumentationRuntimeUBSan.cpp @@ -29,7 +29,7 @@ #include "lldb/Target/Thread.h" #include "lldb/Utility/RegularExpression.h" #include "lldb/Utility/Stream.h" -#include <ctype.h> +#include <cctype> #include <memory> diff --git a/lldb/source/Plugins/Language/ObjC/CoreMedia.cpp b/lldb/source/Plugins/Language/ObjC/CoreMedia.cpp index efc80cc..a862da5 100644 --- a/lldb/source/Plugins/Language/ObjC/CoreMedia.cpp +++ b/lldb/source/Plugins/Language/ObjC/CoreMedia.cpp @@ -13,7 +13,7 @@ #include "lldb/Symbol/TypeSystem.h" #include "lldb/Target/Target.h" -#include <inttypes.h> +#include <cinttypes> using namespace lldb; using namespace lldb_private; diff --git a/lldb/source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.cpp b/lldb/source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.cpp index ff2c064..bed2a98 100644 --- a/lldb/source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.cpp +++ b/lldb/source/Plugins/LanguageRuntime/CPlusPlus/CPPLanguageRuntime.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include <string.h> +#include <cstring> #include <memory> diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp index b9151a0..ab9cfab 100644 --- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp +++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include <stdint.h> +#include <cstdint> #include <memory> #include <string> diff --git a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.h b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.h index 062271f..4fde0d1 100644 --- a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.h +++ b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.h @@ -9,7 +9,7 @@ #ifndef LLDB_SOURCE_PLUGINS_OBJECTFILE_ELF_OBJECTFILEELF_H #define LLDB_SOURCE_PLUGINS_OBJECTFILE_ELF_OBJECTFILEELF_H -#include <stdint.h> +#include <cstdint> #include <vector> diff --git a/lldb/source/Plugins/Platform/Android/AdbClient.cpp b/lldb/source/Plugins/Platform/Android/AdbClient.cpp index ffccd6d..a4f9c76 100644 --- a/lldb/source/Plugins/Platform/Android/AdbClient.cpp +++ b/lldb/source/Plugins/Platform/Android/AdbClient.cpp @@ -24,7 +24,7 @@ #include "lldb/Utility/StreamString.h" #include "lldb/Utility/Timeout.h" -#include <limits.h> +#include <climits> #include <algorithm> #include <cstdlib> diff --git a/lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp b/lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp index 6b39a83..7b3d8a3 100644 --- a/lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp +++ b/lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp @@ -9,7 +9,7 @@ #include "PlatformFreeBSD.h" #include "lldb/Host/Config.h" -#include <stdio.h> +#include <cstdio> #if LLDB_ENABLE_POSIX #include <sys/utsname.h> #endif diff --git a/lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp b/lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp index 2cb671f..314730c 100644 --- a/lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp +++ b/lldb/source/Plugins/Platform/Linux/PlatformLinux.cpp @@ -9,7 +9,7 @@ #include "PlatformLinux.h" #include "lldb/Host/Config.h" -#include <stdio.h> +#include <cstdio> #if LLDB_ENABLE_POSIX #include <sys/utsname.h> #endif diff --git a/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp b/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp index f1ca859..7ddf4d4 100644 --- a/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp +++ b/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp @@ -8,7 +8,7 @@ #include "PlatformDarwin.h" -#include <string.h> +#include <cstring> #include <algorithm> #include <memory> diff --git a/lldb/source/Plugins/Platform/NetBSD/PlatformNetBSD.cpp b/lldb/source/Plugins/Platform/NetBSD/PlatformNetBSD.cpp index a5d73c9..e3682b4 100644 --- a/lldb/source/Plugins/Platform/NetBSD/PlatformNetBSD.cpp +++ b/lldb/source/Plugins/Platform/NetBSD/PlatformNetBSD.cpp @@ -9,7 +9,7 @@ #include "PlatformNetBSD.h" #include "lldb/Host/Config.h" -#include <stdio.h> +#include <cstdio> #if LLDB_ENABLE_POSIX #include <sys/utsname.h> #endif diff --git a/lldb/source/Plugins/Platform/OpenBSD/PlatformOpenBSD.cpp b/lldb/source/Plugins/Platform/OpenBSD/PlatformOpenBSD.cpp index 2cd024f..012b688 100644 --- a/lldb/source/Plugins/Platform/OpenBSD/PlatformOpenBSD.cpp +++ b/lldb/source/Plugins/Platform/OpenBSD/PlatformOpenBSD.cpp @@ -9,7 +9,7 @@ #include "PlatformOpenBSD.h" #include "lldb/Host/Config.h" -#include <stdio.h> +#include <cstdio> #if LLDB_ENABLE_POSIX #include <sys/utsname.h> #endif diff --git a/lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp b/lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp index 3527fb1..fd28eec 100644 --- a/lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp +++ b/lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp @@ -8,7 +8,7 @@ #include "PlatformWindows.h" -#include <stdio.h> +#include <cstdio> #if defined(_WIN32) #include "lldb/Host/windows/windows.h" #include <winsock2.h> diff --git a/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp b/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp index 963b4b84..62c2a72 100644 --- a/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp +++ b/lldb/source/Plugins/Process/Linux/NativeProcessLinux.cpp @@ -8,9 +8,9 @@ #include "NativeProcessLinux.h" -#include <errno.h> -#include <stdint.h> -#include <string.h> +#include <cerrno> +#include <cstdint> +#include <cstring> #include <unistd.h> #include <fstream> diff --git a/lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp b/lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp index c44f10c..d8ba541 100644 --- a/lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp +++ b/lldb/source/Plugins/Process/Linux/NativeThreadLinux.cpp @@ -8,7 +8,7 @@ #include "NativeThreadLinux.h" -#include <signal.h> +#include <csignal> #include <sstream> #include "NativeProcessLinux.h" diff --git a/lldb/source/Plugins/Process/Linux/SingleStepCheck.cpp b/lldb/source/Plugins/Process/Linux/SingleStepCheck.cpp index f0c6bdc..5b337f1 100644 --- a/lldb/source/Plugins/Process/Linux/SingleStepCheck.cpp +++ b/lldb/source/Plugins/Process/Linux/SingleStepCheck.cpp @@ -8,8 +8,8 @@ #include "SingleStepCheck.h" +#include <csignal> #include <sched.h> -#include <signal.h> #include <sys/wait.h> #include <unistd.h> diff --git a/lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp b/lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp index fc0539a0..d397d16 100644 --- a/lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp +++ b/lldb/source/Plugins/Process/MacOSX-Kernel/CommunicationKDP.cpp @@ -8,10 +8,9 @@ #include "CommunicationKDP.h" -#include <errno.h> -#include <limits.h> -#include <string.h> - +#include <cerrno> +#include <climits> +#include <cstring> #include "lldb/Core/DumpDataExtractor.h" #include "lldb/Host/Host.h" diff --git a/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp b/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp index 913c889..0f0e978 100644 --- a/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp +++ b/lldb/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include <errno.h> -#include <stdlib.h> +#include <cerrno> +#include <cstdlib> #include <memory> #include <mutex> diff --git a/lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp b/lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp index 4caa548..3d164ea 100644 --- a/lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp +++ b/lldb/source/Plugins/Process/NetBSD/NativeRegisterContextNetBSD_x86_64.cpp @@ -29,8 +29,8 @@ #include <x86/specialreg.h> #include <elf.h> #include <err.h> -#include <stdint.h> -#include <stdlib.h> +#include <cstdint> +#include <cstdlib> // clang-format on using namespace lldb_private; diff --git a/lldb/source/Plugins/Process/POSIX/CrashReason.h b/lldb/source/Plugins/Process/POSIX/CrashReason.h index f521389..24acdc0 100644 --- a/lldb/source/Plugins/Process/POSIX/CrashReason.h +++ b/lldb/source/Plugins/Process/POSIX/CrashReason.h @@ -11,7 +11,7 @@ #include "lldb/lldb-types.h" -#include <signal.h> +#include <csignal> #include <string> diff --git a/lldb/source/Plugins/Process/Utility/LinuxPTraceDefines_arm64sve.h b/lldb/source/Plugins/Process/Utility/LinuxPTraceDefines_arm64sve.h index 7f6f7cf..9e2225f 100644 --- a/lldb/source/Plugins/Process/Utility/LinuxPTraceDefines_arm64sve.h +++ b/lldb/source/Plugins/Process/Utility/LinuxPTraceDefines_arm64sve.h @@ -9,7 +9,7 @@ #ifndef LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_LINUXPTRACEDEFINES_ARM64SVE_H #define LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_LINUXPTRACEDEFINES_ARM64SVE_H -#include <stdint.h> +#include <cstdint> namespace lldb_private { namespace sve { diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_i386.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_i386.cpp index c5ebddc..07420a9 100644 --- a/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_i386.cpp +++ b/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_i386.cpp @@ -15,7 +15,7 @@ #include "llvm/ADT/STLExtras.h" #include "llvm/Support/Compiler.h" -#include <stddef.h> +#include <cstddef> #include <memory> diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_x86_64.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_x86_64.cpp index 38cd00a..39e2c6b 100644 --- a/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_x86_64.cpp +++ b/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_x86_64.cpp @@ -6,9 +6,9 @@ // //===----------------------------------------------------------------------===// -#include <inttypes.h> -#include <stdarg.h> -#include <stddef.h> +#include <cinttypes> +#include <cstdarg> +#include <cstddef> #include <memory> diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_arm.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_arm.cpp index 97a7603..92553a8 100644 --- a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_arm.cpp +++ b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_arm.cpp @@ -6,9 +6,9 @@ // //===----------------------------------------------------------------------===// +#include <cerrno> +#include <cstdint> #include <cstring> -#include <errno.h> -#include <stdint.h> #include "lldb/Target/Process.h" #include "lldb/Target/Target.h" diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_arm64.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_arm64.cpp index c4e7eda..38926f0 100644 --- a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_arm64.cpp +++ b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_arm64.cpp @@ -6,9 +6,9 @@ // //===----------------------------------------------------------------------===// +#include <cerrno> +#include <cstdint> #include <cstring> -#include <errno.h> -#include <stdint.h> #include "lldb/Target/Process.h" #include "lldb/Target/Target.h" diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_mips64.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_mips64.cpp index 261310c..e40542f 100644 --- a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_mips64.cpp +++ b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_mips64.cpp @@ -6,9 +6,9 @@ // //===----------------------------------------------------------------------===// +#include <cerrno> +#include <cstdint> #include <cstring> -#include <errno.h> -#include <stdint.h> #include "lldb/Target/Process.h" #include "lldb/Target/Target.h" diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_powerpc.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_powerpc.cpp index cd65b96..5c6855d 100644 --- a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_powerpc.cpp +++ b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_powerpc.cpp @@ -6,9 +6,9 @@ // //===----------------------------------------------------------------------===// +#include <cerrno> +#include <cstdint> #include <cstring> -#include <errno.h> -#include <stdint.h> #include "lldb/Target/Process.h" #include "lldb/Target/Target.h" diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_ppc64le.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_ppc64le.cpp index f670be2..f70ddeb 100644 --- a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_ppc64le.cpp +++ b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_ppc64le.cpp @@ -6,9 +6,9 @@ // //===----------------------------------------------------------------------===// +#include <cerrno> +#include <cstdint> #include <cstring> -#include <errno.h> -#include <stdint.h> #include "lldb/Target/Process.h" #include "lldb/Target/Target.h" diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_s390x.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_s390x.cpp index e746ec6..df5c33f 100644 --- a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_s390x.cpp +++ b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_s390x.cpp @@ -6,9 +6,9 @@ // //===----------------------------------------------------------------------===// +#include <cerrno> +#include <cstdint> #include <cstring> -#include <errno.h> -#include <stdint.h> #include "lldb/Target/Process.h" #include "lldb/Target/Target.h" diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_x86.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_x86.cpp index 2c7f635..19e68f6 100644 --- a/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_x86.cpp +++ b/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_x86.cpp @@ -6,9 +6,9 @@ // //===----------------------------------------------------------------------===// +#include <cerrno> +#include <cstdint> #include <cstring> -#include <errno.h> -#include <stdint.h> #include "lldb/Target/Process.h" #include "lldb/Target/Target.h" diff --git a/lldb/source/Plugins/Process/Utility/RegisterInfoPOSIX_arm.cpp b/lldb/source/Plugins/Process/Utility/RegisterInfoPOSIX_arm.cpp index 17b96f9..63461f7 100644 --- a/lldb/source/Plugins/Process/Utility/RegisterInfoPOSIX_arm.cpp +++ b/lldb/source/Plugins/Process/Utility/RegisterInfoPOSIX_arm.cpp @@ -7,7 +7,7 @@ //===---------------------------------------------------------------------===// #include <cassert> -#include <stddef.h> +#include <cstddef> #include <vector> #include "lldb/lldb-defines.h" diff --git a/lldb/source/Plugins/Process/Utility/RegisterInfoPOSIX_arm64.cpp b/lldb/source/Plugins/Process/Utility/RegisterInfoPOSIX_arm64.cpp index 4a29c990..b878534b 100644 --- a/lldb/source/Plugins/Process/Utility/RegisterInfoPOSIX_arm64.cpp +++ b/lldb/source/Plugins/Process/Utility/RegisterInfoPOSIX_arm64.cpp @@ -7,7 +7,7 @@ //===---------------------------------------------------------------------===// #include <cassert> -#include <stddef.h> +#include <cstddef> #include <vector> #include "lldb/lldb-defines.h" diff --git a/lldb/source/Plugins/Process/Utility/RegisterInfoPOSIX_ppc64le.cpp b/lldb/source/Plugins/Process/Utility/RegisterInfoPOSIX_ppc64le.cpp index 3461d38..159fd28 100644 --- a/lldb/source/Plugins/Process/Utility/RegisterInfoPOSIX_ppc64le.cpp +++ b/lldb/source/Plugins/Process/Utility/RegisterInfoPOSIX_ppc64le.cpp @@ -7,7 +7,7 @@ //===---------------------------------------------------------------------===// #include <cassert> -#include <stddef.h> +#include <cstddef> #include <vector> #include "lldb/lldb-defines.h" diff --git a/lldb/source/Plugins/Process/Utility/RegisterInfos_arm.h b/lldb/source/Plugins/Process/Utility/RegisterInfos_arm.h index 74b9e3b..4af0069 100644 --- a/lldb/source/Plugins/Process/Utility/RegisterInfos_arm.h +++ b/lldb/source/Plugins/Process/Utility/RegisterInfos_arm.h @@ -8,7 +8,7 @@ #ifdef DECLARE_REGISTER_INFOS_ARM_STRUCT -#include <stddef.h> +#include <cstddef> #include "lldb/lldb-defines.h" #include "lldb/lldb-enumerations.h" diff --git a/lldb/source/Plugins/Process/Utility/RegisterInfos_arm64.h b/lldb/source/Plugins/Process/Utility/RegisterInfos_arm64.h index 95b1f8f..47cedc3 100644 --- a/lldb/source/Plugins/Process/Utility/RegisterInfos_arm64.h +++ b/lldb/source/Plugins/Process/Utility/RegisterInfos_arm64.h @@ -8,7 +8,7 @@ #ifdef DECLARE_REGISTER_INFOS_ARM64_STRUCT -#include <stddef.h> +#include <cstddef> #include "lldb/lldb-defines.h" #include "lldb/lldb-enumerations.h" diff --git a/lldb/source/Plugins/Process/Utility/RegisterInfos_mips.h b/lldb/source/Plugins/Process/Utility/RegisterInfos_mips.h index 08201fd..93f93d5 100644 --- a/lldb/source/Plugins/Process/Utility/RegisterInfos_mips.h +++ b/lldb/source/Plugins/Process/Utility/RegisterInfos_mips.h @@ -6,7 +6,7 @@ // //===---------------------------------------------------------------------===// -#include <stddef.h> +#include <cstddef> #include "lldb/Core/dwarf.h" #include "llvm/Support/Compiler.h" diff --git a/lldb/source/Plugins/Process/Utility/RegisterInfos_mips64.h b/lldb/source/Plugins/Process/Utility/RegisterInfos_mips64.h index dc4da06..b28b918 100644 --- a/lldb/source/Plugins/Process/Utility/RegisterInfos_mips64.h +++ b/lldb/source/Plugins/Process/Utility/RegisterInfos_mips64.h @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include <stddef.h> +#include <cstddef> #include "lldb/Core/dwarf.h" #include "llvm/Support/Compiler.h" diff --git a/lldb/source/Plugins/Process/Utility/RegisterInfos_powerpc.h b/lldb/source/Plugins/Process/Utility/RegisterInfos_powerpc.h index 90863df..04b4171 100644 --- a/lldb/source/Plugins/Process/Utility/RegisterInfos_powerpc.h +++ b/lldb/source/Plugins/Process/Utility/RegisterInfos_powerpc.h @@ -6,7 +6,7 @@ // //===---------------------------------------------------------------------===// -#include <stddef.h> +#include <cstddef> // Computes the offset of the given GPR in the user data area. #define GPR_OFFSET(regname) (offsetof(GPR, regname)) diff --git a/lldb/source/Plugins/Process/Utility/RegisterInfos_ppc64.h b/lldb/source/Plugins/Process/Utility/RegisterInfos_ppc64.h index 1086d3d..059dba4 100644 --- a/lldb/source/Plugins/Process/Utility/RegisterInfos_ppc64.h +++ b/lldb/source/Plugins/Process/Utility/RegisterInfos_ppc64.h @@ -8,7 +8,7 @@ #ifdef DECLARE_REGISTER_INFOS_PPC64_STRUCT -#include <stddef.h> +#include <cstddef> // Computes the offset of the given GPR_PPC64 in the user data area. #define GPR_PPC64_OFFSET(regname) (offsetof(GPR_PPC64, regname)) diff --git a/lldb/source/Plugins/Process/Utility/RegisterInfos_ppc64le.h b/lldb/source/Plugins/Process/Utility/RegisterInfos_ppc64le.h index 0b099a53..9937da2 100644 --- a/lldb/source/Plugins/Process/Utility/RegisterInfos_ppc64le.h +++ b/lldb/source/Plugins/Process/Utility/RegisterInfos_ppc64le.h @@ -8,7 +8,7 @@ #ifdef DECLARE_REGISTER_INFOS_PPC64LE_STRUCT -#include <stddef.h> +#include <cstddef> // Computes the offset of the given GPR in the user data area. #define GPR_OFFSET(regname) (offsetof(GPR, regname)) diff --git a/lldb/source/Plugins/Process/Utility/RegisterInfos_s390x.h b/lldb/source/Plugins/Process/Utility/RegisterInfos_s390x.h index 11344ff..d1df7c6 100644 --- a/lldb/source/Plugins/Process/Utility/RegisterInfos_s390x.h +++ b/lldb/source/Plugins/Process/Utility/RegisterInfos_s390x.h @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include <stddef.h> +#include <cstddef> #include "llvm/Support/Compiler.h" diff --git a/lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp b/lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp index 78edd69..21f1b93 100644 --- a/lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp +++ b/lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include <stdlib.h> +#include <cstdlib> #include <memory> #include <mutex> diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp index 4981345..013d407 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp @@ -8,9 +8,9 @@ #include "GDBRemoteCommunication.h" +#include <climits> +#include <cstring> #include <future> -#include <limits.h> -#include <string.h> #include <sys/stat.h> #include "lldb/Core/StreamFile.h" diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp index d709716..deb254e 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp @@ -8,7 +8,7 @@ #include "GDBRemoteCommunicationClient.h" -#include <math.h> +#include <cmath> #include <sys/stat.h> #include <numeric> diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationReplayServer.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationReplayServer.cpp index 920327e..992adee 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationReplayServer.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationReplayServer.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include <errno.h> +#include <cerrno> #include "lldb/Host/Config.h" #include "llvm/ADT/ScopeExit.h" diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp index 2996717..8b7231a 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServer.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include <errno.h> +#include <cerrno> #include "lldb/Host/Config.h" diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp index 78ee77f..5ea7b09 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.cpp @@ -8,7 +8,7 @@ #include "GDBRemoteCommunicationServerCommon.h" -#include <errno.h> +#include <cerrno> #ifdef __APPLE__ #include <TargetConditionals.h> diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp index 1825bc8..b6982f4 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include <errno.h> +#include <cerrno> #include "lldb/Host/Config.h" diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp index 3462fb7..b7b6489 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp @@ -8,7 +8,7 @@ #include "GDBRemoteCommunicationServerPlatform.h" -#include <errno.h> +#include <cerrno> #include <chrono> #include <csignal> diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp index f8e0567..3028e2c 100644 --- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp @@ -8,8 +8,8 @@ #include "lldb/Host/Config.h" -#include <errno.h> -#include <stdlib.h> +#include <cerrno> +#include <cstdlib> #if LLDB_ENABLE_POSIX #include <netinet/in.h> #include <sys/mman.h> @@ -20,8 +20,8 @@ #if defined(__APPLE__) #include <sys/sysctl.h> #endif +#include <ctime> #include <sys/types.h> -#include <time.h> #include <algorithm> #include <csignal> diff --git a/lldb/source/Plugins/Process/mach-core/ProcessMachCore.cpp b/lldb/source/Plugins/Process/mach-core/ProcessMachCore.cpp index 44bdf0a..68c63b8 100644 --- a/lldb/source/Plugins/Process/mach-core/ProcessMachCore.cpp +++ b/lldb/source/Plugins/Process/mach-core/ProcessMachCore.cpp @@ -6,8 +6,8 @@ // //===----------------------------------------------------------------------===// -#include <errno.h> -#include <stdlib.h> +#include <cerrno> +#include <cstdlib> #include "llvm/Support/MathExtras.h" #include "llvm/Support/Threading.h" diff --git a/lldb/source/Plugins/Process/minidump/RegisterContextMinidump_ARM.cpp b/lldb/source/Plugins/Process/minidump/RegisterContextMinidump_ARM.cpp index eb48785..7e309e8 100644 --- a/lldb/source/Plugins/Process/minidump/RegisterContextMinidump_ARM.cpp +++ b/lldb/source/Plugins/Process/minidump/RegisterContextMinidump_ARM.cpp @@ -16,7 +16,7 @@ #include "lldb/lldb-enumerations.h" // C includes -#include <assert.h> +#include <cassert> // C++ includes diff --git a/lldb/source/Plugins/Process/minidump/RegisterContextMinidump_ARM64.cpp b/lldb/source/Plugins/Process/minidump/RegisterContextMinidump_ARM64.cpp index c7809c5..e2b7c0e 100644 --- a/lldb/source/Plugins/Process/minidump/RegisterContextMinidump_ARM64.cpp +++ b/lldb/source/Plugins/Process/minidump/RegisterContextMinidump_ARM64.cpp @@ -14,7 +14,7 @@ #include "lldb/lldb-enumerations.h" // C includes -#include <assert.h> +#include <cassert> // C++ includes diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp b/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp index 7c49502..f51d9b3 100644 --- a/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp +++ b/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp @@ -24,7 +24,7 @@ #include "llvm/Support/ConvertUTF.h" #include "llvm/Support/Errno.h" -#include <stdio.h> +#include <cstdio> using namespace lldb_private; using namespace lldb; diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/PythonReadline.cpp b/lldb/source/Plugins/ScriptInterpreter/Python/PythonReadline.cpp index 5f6429f..95a3365 100644 --- a/lldb/source/Plugins/ScriptInterpreter/Python/PythonReadline.cpp +++ b/lldb/source/Plugins/ScriptInterpreter/Python/PythonReadline.cpp @@ -2,7 +2,7 @@ #ifdef LLDB_USE_LIBEDIT_READLINE_COMPAT_MODULE -#include <stdio.h> +#include <cstdio> #include <editline/readline.h> diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp index 5f3c0b27..025c2eb 100644 --- a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp +++ b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp @@ -45,10 +45,10 @@ #include "llvm/Support/FileSystem.h" #include "llvm/Support/FormatAdapters.h" +#include <cstdio> +#include <cstdlib> #include <memory> #include <mutex> -#include <stdio.h> -#include <stdlib.h> #include <string> using namespace lldb; diff --git a/lldb/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp b/lldb/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp index f669e58..ce9b346 100644 --- a/lldb/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp +++ b/lldb/source/Plugins/StructuredData/DarwinLog/StructuredDataDarwinLog.cpp @@ -8,7 +8,7 @@ #include "StructuredDataDarwinLog.h" -#include <string.h> +#include <cstring> #include <memory> #include <sstream> diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp index 744be00..45c40c1 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include <stdlib.h> +#include <cstdlib> #include "DWARFASTParserClang.h" #include "DWARFDebugInfo.h" @@ -49,7 +49,7 @@ //#define ENABLE_DEBUG_PRINTF // COMMENT OUT THIS LINE PRIOR TO CHECKIN #ifdef ENABLE_DEBUG_PRINTF -#include <stdio.h> +#include <cstdio> #define DEBUG_PRINTF(fmt, ...) printf(fmt, __VA_ARGS__) #else #define DEBUG_PRINTF(fmt, ...) diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp index a71babaad..39915aa 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp @@ -8,7 +8,7 @@ #include "DWARFDebugInfoEntry.h" -#include <assert.h> +#include <cassert> #include <algorithm> diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDefines.h b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDefines.h index 1b7102c..2d0d5ca 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDefines.h +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDefines.h @@ -10,7 +10,7 @@ #define LLDB_SOURCE_PLUGINS_SYMBOLFILE_DWARF_DWARFDEFINES_H #include "lldb/Core/dwarf.h" -#include <stdint.h> +#include <cstdint> namespace lldb_private { diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp index ec78c5b..4c49870 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include <assert.h> +#include <cassert> #include "lldb/Core/Module.h" #include "lldb/Core/dwarf.h" diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.h b/lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.h index fe6a555..9ca4cc1 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.h +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.h @@ -10,8 +10,8 @@ #define LLDB_SOURCE_PLUGINS_SYMBOLFILE_DWARF_DWARFFORMVALUE_H #include "DWARFDataExtractor.h" -#include <stddef.h> #include "llvm/ADT/Optional.h" +#include <cstddef> class DWARFUnit; class SymbolFileDWARF; diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp index 4b5f600..ec3bee2 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp @@ -81,13 +81,13 @@ #include <map> #include <memory> -#include <ctype.h> -#include <string.h> +#include <cctype> +#include <cstring> //#define ENABLE_DEBUG_PRINTF // COMMENT OUT THIS LINE PRIOR TO CHECKIN #ifdef ENABLE_DEBUG_PRINTF -#include <stdio.h> +#include <cstdio> #define DEBUG_PRINTF(fmt, ...) printf(fmt, __VA_ARGS__) #else #define DEBUG_PRINTF(fmt, ...) diff --git a/lldb/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp b/lldb/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp index 4df5140..9130eed 100644 --- a/lldb/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp +++ b/lldb/source/Plugins/SymbolVendor/ELF/SymbolVendorELF.cpp @@ -8,7 +8,7 @@ #include "SymbolVendorELF.h" -#include <string.h> +#include <cstring> #include "Plugins/ObjectFile/ELF/ObjectFileELF.h" #include "lldb/Core/Module.h" diff --git a/lldb/source/Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.cpp b/lldb/source/Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.cpp index 605a35d..cd1aceb 100644 --- a/lldb/source/Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.cpp +++ b/lldb/source/Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.cpp @@ -8,7 +8,7 @@ #include "SymbolVendorMacOSX.h" -#include <string.h> +#include <cstring> #include "Plugins/ObjectFile/Mach-O/ObjectFileMachO.h" #include "lldb/Core/Module.h" diff --git a/lldb/source/Plugins/SymbolVendor/wasm/SymbolVendorWasm.cpp b/lldb/source/Plugins/SymbolVendor/wasm/SymbolVendorWasm.cpp index 67a1ef5e..2b28407 100644 --- a/lldb/source/Plugins/SymbolVendor/wasm/SymbolVendorWasm.cpp +++ b/lldb/source/Plugins/SymbolVendor/wasm/SymbolVendorWasm.cpp @@ -8,7 +8,7 @@ #include "SymbolVendorWasm.h" -#include <string.h> +#include <cstring> #include "Plugins/ObjectFile/wasm/ObjectFileWasm.h" #include "lldb/Core/Module.h" diff --git a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp index 6f13325..c7bfdda 100644 --- a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp +++ b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp @@ -75,7 +75,7 @@ #include "Plugins/SymbolFile/DWARF/DWARFASTParserClang.h" #include "Plugins/SymbolFile/PDB/PDBASTParser.h" -#include <stdio.h> +#include <cstdio> #include <mutex> diff --git a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h index 45c84e7..1a64a55 100644 --- a/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h +++ b/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h @@ -9,7 +9,7 @@ #ifndef LLDB_SOURCE_PLUGINS_TYPESYSTEM_CLANG_TYPESYSTEMCLANG_H #define LLDB_SOURCE_PLUGINS_TYPESYSTEM_CLANG_TYPESYSTEMCLANG_H -#include <stdint.h> +#include <cstdint> #include <functional> #include <initializer_list> diff --git a/lldb/source/Symbol/Type.cpp b/lldb/source/Symbol/Type.cpp index 8c67748..7841970 100644 --- a/lldb/source/Symbol/Type.cpp +++ b/lldb/source/Symbol/Type.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include <stdio.h> +#include <cstdio> #include "lldb/Core/Module.h" #include "lldb/Utility/DataBufferHeap.h" diff --git a/lldb/source/Symbol/UnwindTable.cpp b/lldb/source/Symbol/UnwindTable.cpp index 3faa528..5bc8449 100644 --- a/lldb/source/Symbol/UnwindTable.cpp +++ b/lldb/source/Symbol/UnwindTable.cpp @@ -8,7 +8,7 @@ #include "lldb/Symbol/UnwindTable.h" -#include <stdio.h> +#include <cstdio> #include "lldb/Core/Module.h" #include "lldb/Core/Section.h" diff --git a/lldb/source/Target/ModuleCache.cpp b/lldb/source/Target/ModuleCache.cpp index 20661a7..dcdc077 100644 --- a/lldb/source/Target/ModuleCache.cpp +++ b/lldb/source/Target/ModuleCache.cpp @@ -17,7 +17,7 @@ #include "llvm/Support/FileSystem.h" #include "llvm/Support/FileUtilities.h" -#include <assert.h> +#include <cassert> #include <cstdio> diff --git a/lldb/source/Target/ThreadCollection.cpp b/lldb/source/Target/ThreadCollection.cpp index 05b041c..8c23097 100644 --- a/lldb/source/Target/ThreadCollection.cpp +++ b/lldb/source/Target/ThreadCollection.cpp @@ -5,7 +5,7 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// -#include <stdlib.h> +#include <cstdlib> #include <algorithm> #include <mutex> diff --git a/lldb/source/Target/ThreadList.cpp b/lldb/source/Target/ThreadList.cpp index 032dcc9..df2cc8e 100644 --- a/lldb/source/Target/ThreadList.cpp +++ b/lldb/source/Target/ThreadList.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include <stdlib.h> +#include <cstdlib> #include <algorithm> diff --git a/lldb/source/Utility/Broadcaster.cpp b/lldb/source/Utility/Broadcaster.cpp index 342548c..6e06724 100644 --- a/lldb/source/Utility/Broadcaster.cpp +++ b/lldb/source/Utility/Broadcaster.cpp @@ -19,8 +19,8 @@ #include <memory> #include <utility> -#include <assert.h> -#include <stddef.h> +#include <cassert> +#include <cstddef> using namespace lldb; using namespace lldb_private; diff --git a/lldb/source/Utility/ConstString.cpp b/lldb/source/Utility/ConstString.cpp index 11f48d0..3f649b1 100644 --- a/lldb/source/Utility/ConstString.cpp +++ b/lldb/source/Utility/ConstString.cpp @@ -21,9 +21,9 @@ #include <array> #include <utility> -#include <inttypes.h> -#include <stdint.h> -#include <string.h> +#include <cinttypes> +#include <cstdint> +#include <cstring> using namespace lldb_private; diff --git a/lldb/source/Utility/DataBufferLLVM.cpp b/lldb/source/Utility/DataBufferLLVM.cpp index 235123a..afd633a 100644 --- a/lldb/source/Utility/DataBufferLLVM.cpp +++ b/lldb/source/Utility/DataBufferLLVM.cpp @@ -10,7 +10,7 @@ #include "llvm/Support/MemoryBuffer.h" -#include <assert.h> +#include <cassert> using namespace lldb_private; diff --git a/lldb/source/Utility/DataEncoder.cpp b/lldb/source/Utility/DataEncoder.cpp index 7532ac1..9c8f10d 100644 --- a/lldb/source/Utility/DataEncoder.cpp +++ b/lldb/source/Utility/DataEncoder.cpp @@ -16,7 +16,7 @@ #include <cstddef> -#include <string.h> +#include <cstring> using namespace lldb; using namespace lldb_private; diff --git a/lldb/source/Utility/DataExtractor.cpp b/lldb/source/Utility/DataExtractor.cpp index 64b878d..b31f44c 100644 --- a/lldb/source/Utility/DataExtractor.cpp +++ b/lldb/source/Utility/DataExtractor.cpp @@ -33,9 +33,9 @@ #include <cstdint> #include <string> -#include <ctype.h> -#include <inttypes.h> -#include <string.h> +#include <cctype> +#include <cinttypes> +#include <cstring> using namespace lldb; using namespace lldb_private; diff --git a/lldb/source/Utility/Event.cpp b/lldb/source/Utility/Event.cpp index 50cc7f0..3a4ef4d 100644 --- a/lldb/source/Utility/Event.cpp +++ b/lldb/source/Utility/Event.cpp @@ -17,7 +17,7 @@ #include <algorithm> -#include <ctype.h> +#include <cctype> using namespace lldb; using namespace lldb_private; diff --git a/lldb/source/Utility/FileSpec.cpp b/lldb/source/Utility/FileSpec.cpp index 1ec5d60..39ad8fc 100644 --- a/lldb/source/Utility/FileSpec.cpp +++ b/lldb/source/Utility/FileSpec.cpp @@ -24,10 +24,10 @@ #include <system_error> #include <vector> -#include <assert.h> -#include <limits.h> -#include <stdio.h> -#include <string.h> +#include <cassert> +#include <climits> +#include <cstdio> +#include <cstring> using namespace lldb; using namespace lldb_private; diff --git a/lldb/source/Utility/GDBRemote.cpp b/lldb/source/Utility/GDBRemote.cpp index 4044825..659ab2e 100644 --- a/lldb/source/Utility/GDBRemote.cpp +++ b/lldb/source/Utility/GDBRemote.cpp @@ -11,7 +11,7 @@ #include "lldb/Utility/Flags.h" #include "lldb/Utility/Stream.h" -#include <stdio.h> +#include <cstdio> using namespace lldb; using namespace lldb_private::repro; diff --git a/lldb/source/Utility/Log.cpp b/lldb/source/Utility/Log.cpp index 4df82f2..1e19208 100644 --- a/lldb/source/Utility/Log.cpp +++ b/lldb/source/Utility/Log.cpp @@ -25,7 +25,7 @@ #include <mutex> #include <utility> -#include <assert.h> +#include <cassert> #if defined(_WIN32) #include <process.h> #else diff --git a/lldb/source/Utility/Logging.cpp b/lldb/source/Utility/Logging.cpp index 435017e..4648bec 100644 --- a/lldb/source/Utility/Logging.cpp +++ b/lldb/source/Utility/Logging.cpp @@ -11,7 +11,7 @@ #include "llvm/ADT/ArrayRef.h" -#include <stdarg.h> +#include <cstdarg> using namespace lldb_private; diff --git a/lldb/source/Utility/RegisterValue.cpp b/lldb/source/Utility/RegisterValue.cpp index 7848f78..a298c70 100644 --- a/lldb/source/Utility/RegisterValue.cpp +++ b/lldb/source/Utility/RegisterValue.cpp @@ -24,9 +24,9 @@ #include <tuple> #include <vector> -#include <assert.h> -#include <inttypes.h> -#include <stdio.h> +#include <cassert> +#include <cinttypes> +#include <cstdio> using namespace lldb; using namespace lldb_private; diff --git a/lldb/source/Utility/ReproducerInstrumentation.cpp b/lldb/source/Utility/ReproducerInstrumentation.cpp index b274a10..6b729da 100644 --- a/lldb/source/Utility/ReproducerInstrumentation.cpp +++ b/lldb/source/Utility/ReproducerInstrumentation.cpp @@ -8,9 +8,9 @@ #include "lldb/Utility/ReproducerInstrumentation.h" #include "lldb/Utility/Reproducer.h" +#include <cstdio> +#include <cstdlib> #include <limits> -#include <stdio.h> -#include <stdlib.h> #include <thread> using namespace lldb_private; diff --git a/lldb/source/Utility/SelectHelper.cpp b/lldb/source/Utility/SelectHelper.cpp index 40c85be..059f810 100644 --- a/lldb/source/Utility/SelectHelper.cpp +++ b/lldb/source/Utility/SelectHelper.cpp @@ -25,7 +25,7 @@ #include <algorithm> #include <chrono> -#include <errno.h> +#include <cerrno> #if defined(_WIN32) // Define NOMINMAX to avoid macros that conflict with std::min and std::max #define NOMINMAX diff --git a/lldb/source/Utility/Status.cpp b/lldb/source/Utility/Status.cpp index e3c4284..02e2697 100644 --- a/lldb/source/Utility/Status.cpp +++ b/lldb/source/Utility/Status.cpp @@ -28,7 +28,7 @@ #ifdef _WIN32 #include <windows.h> #endif -#include <stdint.h> +#include <cstdint> namespace llvm { class raw_ostream; diff --git a/lldb/source/Utility/Stream.cpp b/lldb/source/Utility/Stream.cpp index a0623bf..ea9c2da 100644 --- a/lldb/source/Utility/Stream.cpp +++ b/lldb/source/Utility/Stream.cpp @@ -16,8 +16,8 @@ #include <string> -#include <inttypes.h> -#include <stddef.h> +#include <cinttypes> +#include <cstddef> using namespace lldb; using namespace lldb_private; diff --git a/lldb/source/Utility/StringExtractor.cpp b/lldb/source/Utility/StringExtractor.cpp index 0553a63..f5d3577 100644 --- a/lldb/source/Utility/StringExtractor.cpp +++ b/lldb/source/Utility/StringExtractor.cpp @@ -11,9 +11,9 @@ #include <tuple> -#include <ctype.h> -#include <stdlib.h> -#include <string.h> +#include <cctype> +#include <cstdlib> +#include <cstring> static inline int xdigit_to_sint(char ch) { if (ch >= 'a' && ch <= 'f') diff --git a/lldb/source/Utility/StringExtractorGDBRemote.cpp b/lldb/source/Utility/StringExtractorGDBRemote.cpp index dd8064f..ea4b9ef 100644 --- a/lldb/source/Utility/StringExtractorGDBRemote.cpp +++ b/lldb/source/Utility/StringExtractorGDBRemote.cpp @@ -8,8 +8,8 @@ #include "lldb/Utility/StringExtractorGDBRemote.h" -#include <ctype.h> -#include <string.h> +#include <cctype> +#include <cstring> constexpr lldb::pid_t StringExtractorGDBRemote::AllProcesses; constexpr lldb::tid_t StringExtractorGDBRemote::AllThreads; diff --git a/lldb/source/Utility/StringLexer.cpp b/lldb/source/Utility/StringLexer.cpp index 2618551..bda6e25 100644 --- a/lldb/source/Utility/StringLexer.cpp +++ b/lldb/source/Utility/StringLexer.cpp @@ -9,7 +9,7 @@ #include "lldb/Utility/StringLexer.h" #include <algorithm> -#include <assert.h> +#include <cassert> #include <utility> using namespace lldb_private; diff --git a/lldb/source/Utility/StringList.cpp b/lldb/source/Utility/StringList.cpp index d3896ca..fc097dd 100644 --- a/lldb/source/Utility/StringList.cpp +++ b/lldb/source/Utility/StringList.cpp @@ -14,8 +14,8 @@ #include "llvm/ADT/ArrayRef.h" #include <algorithm> -#include <stdint.h> -#include <string.h> +#include <cstdint> +#include <cstring> using namespace lldb_private; diff --git a/lldb/source/Utility/StructuredData.cpp b/lldb/source/Utility/StructuredData.cpp index b349de7..fc10fa5 100644 --- a/lldb/source/Utility/StructuredData.cpp +++ b/lldb/source/Utility/StructuredData.cpp @@ -11,8 +11,8 @@ #include "lldb/Utility/Status.h" #include "llvm/Support/MemoryBuffer.h" #include <cerrno> +#include <cinttypes> #include <cstdlib> -#include <inttypes.h> using namespace lldb_private; using namespace llvm; diff --git a/lldb/source/Utility/TildeExpressionResolver.cpp b/lldb/source/Utility/TildeExpressionResolver.cpp index 75d9c47..29dc7f4 100644 --- a/lldb/source/Utility/TildeExpressionResolver.cpp +++ b/lldb/source/Utility/TildeExpressionResolver.cpp @@ -8,7 +8,7 @@ #include "lldb/Utility/TildeExpressionResolver.h" -#include <assert.h> +#include <cassert> #include <system_error> #include "llvm/ADT/STLExtras.h" diff --git a/lldb/source/Utility/Timer.cpp b/lldb/source/Utility/Timer.cpp index 7ead510..2f3afe4 100644 --- a/lldb/source/Utility/Timer.cpp +++ b/lldb/source/Utility/Timer.cpp @@ -16,10 +16,10 @@ #include <utility> #include <vector> -#include <assert.h> -#include <inttypes.h> -#include <stdarg.h> -#include <stdio.h> +#include <cassert> +#include <cinttypes> +#include <cstdarg> +#include <cstdio> using namespace lldb_private; diff --git a/lldb/source/Utility/UUID.cpp b/lldb/source/Utility/UUID.cpp index 73088fb..0adeb06 100644 --- a/lldb/source/Utility/UUID.cpp +++ b/lldb/source/Utility/UUID.cpp @@ -12,9 +12,9 @@ #include "llvm/ADT/StringRef.h" #include "llvm/Support/Format.h" -#include <ctype.h> -#include <stdio.h> -#include <string.h> +#include <cctype> +#include <cstdio> +#include <cstring> using namespace lldb_private; diff --git a/lldb/source/Utility/UriParser.cpp b/lldb/source/Utility/UriParser.cpp index 8169b0e..c6ed249 100644 --- a/lldb/source/Utility/UriParser.cpp +++ b/lldb/source/Utility/UriParser.cpp @@ -10,7 +10,7 @@ #include <string> -#include <stdint.h> +#include <cstdint> #include <tuple> using namespace lldb_private; diff --git a/lldb/source/Utility/UserID.cpp b/lldb/source/Utility/UserID.cpp index 8e0146b..5bae91a9 100644 --- a/lldb/source/Utility/UserID.cpp +++ b/lldb/source/Utility/UserID.cpp @@ -9,7 +9,7 @@ #include "lldb/Utility/UserID.h" #include "lldb/Utility/Stream.h" -#include <inttypes.h> +#include <cinttypes> using namespace lldb; using namespace lldb_private; diff --git a/lldb/source/Utility/VASprintf.cpp b/lldb/source/Utility/VASprintf.cpp index aea68df..5d361ed 100644 --- a/lldb/source/Utility/VASprintf.cpp +++ b/lldb/source/Utility/VASprintf.cpp @@ -12,9 +12,9 @@ #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/StringRef.h" -#include <assert.h> -#include <stdarg.h> -#include <stdio.h> +#include <cassert> +#include <cstdarg> +#include <cstdio> bool lldb_private::VASprintf(llvm::SmallVectorImpl<char> &buf, const char *fmt, va_list args) { diff --git a/lldb/source/Utility/VMRange.cpp b/lldb/source/Utility/VMRange.cpp index 16c50d6..184531b 100644 --- a/lldb/source/Utility/VMRange.cpp +++ b/lldb/source/Utility/VMRange.cpp @@ -15,8 +15,8 @@ #include <iterator> #include <vector> -#include <stddef.h> -#include <stdint.h> +#include <cstddef> +#include <cstdint> using namespace lldb; using namespace lldb_private; |