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 | |
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
330 files changed, 558 insertions, 562 deletions
diff --git a/lldb/include/lldb/API/SBCommandReturnObject.h b/lldb/include/lldb/API/SBCommandReturnObject.h index 4ee296e..6e1e7ad 100644 --- a/lldb/include/lldb/API/SBCommandReturnObject.h +++ b/lldb/include/lldb/API/SBCommandReturnObject.h @@ -9,7 +9,7 @@ #ifndef LLDB_API_SBCOMMANDRETURNOBJECT_H #define LLDB_API_SBCOMMANDRETURNOBJECT_H -#include <stdio.h> +#include <cstdio> #include <memory> diff --git a/lldb/include/lldb/API/SBDebugger.h b/lldb/include/lldb/API/SBDebugger.h index 489ed4f2..ef62141 100644 --- a/lldb/include/lldb/API/SBDebugger.h +++ b/lldb/include/lldb/API/SBDebugger.h @@ -9,7 +9,7 @@ #ifndef LLDB_API_SBDEBUGGER_H #define LLDB_API_SBDEBUGGER_H -#include <stdio.h> +#include <cstdio> #include "lldb/API/SBDefines.h" #include "lldb/API/SBPlatform.h" diff --git a/lldb/include/lldb/API/SBEvent.h b/lldb/include/lldb/API/SBEvent.h index a7975bf..08682b5 100644 --- a/lldb/include/lldb/API/SBEvent.h +++ b/lldb/include/lldb/API/SBEvent.h @@ -11,7 +11,7 @@ #include "lldb/API/SBDefines.h" -#include <stdio.h> +#include <cstdio> #include <vector> namespace lldb { diff --git a/lldb/include/lldb/API/SBExecutionContext.h b/lldb/include/lldb/API/SBExecutionContext.h index d8447ae..06ece6f 100644 --- a/lldb/include/lldb/API/SBExecutionContext.h +++ b/lldb/include/lldb/API/SBExecutionContext.h @@ -12,7 +12,7 @@ #include "lldb/API/SBDefines.h" -#include <stdio.h> +#include <cstdio> #include <vector> namespace lldb { diff --git a/lldb/include/lldb/API/SBInstruction.h b/lldb/include/lldb/API/SBInstruction.h index 7d07e16..b9d7815 100644 --- a/lldb/include/lldb/API/SBInstruction.h +++ b/lldb/include/lldb/API/SBInstruction.h @@ -12,7 +12,7 @@ #include "lldb/API/SBData.h" #include "lldb/API/SBDefines.h" -#include <stdio.h> +#include <cstdio> // There's a lot to be fixed here, but need to wait for underlying insn // implementation to be revised & settle down first. diff --git a/lldb/include/lldb/API/SBInstructionList.h b/lldb/include/lldb/API/SBInstructionList.h index ae89880..b9c6c66 100644 --- a/lldb/include/lldb/API/SBInstructionList.h +++ b/lldb/include/lldb/API/SBInstructionList.h @@ -11,7 +11,7 @@ #include "lldb/API/SBDefines.h" -#include <stdio.h> +#include <cstdio> namespace lldb { diff --git a/lldb/include/lldb/API/SBProcess.h b/lldb/include/lldb/API/SBProcess.h index a90ec2a..5cf5b1f 100644 --- a/lldb/include/lldb/API/SBProcess.h +++ b/lldb/include/lldb/API/SBProcess.h @@ -14,7 +14,7 @@ #include "lldb/API/SBProcessInfo.h" #include "lldb/API/SBQueue.h" #include "lldb/API/SBTarget.h" -#include <stdio.h> +#include <cstdio> namespace lldb { diff --git a/lldb/include/lldb/API/SBSourceManager.h b/lldb/include/lldb/API/SBSourceManager.h index c8302db..e95cfa6 100644 --- a/lldb/include/lldb/API/SBSourceManager.h +++ b/lldb/include/lldb/API/SBSourceManager.h @@ -11,7 +11,7 @@ #include "lldb/API/SBDefines.h" -#include <stdio.h> +#include <cstdio> namespace lldb { diff --git a/lldb/include/lldb/API/SBStream.h b/lldb/include/lldb/API/SBStream.h index f39bf13..a01fb0f 100644 --- a/lldb/include/lldb/API/SBStream.h +++ b/lldb/include/lldb/API/SBStream.h @@ -9,7 +9,7 @@ #ifndef LLDB_API_SBSTREAM_H #define LLDB_API_SBSTREAM_H -#include <stdio.h> +#include <cstdio> #include "lldb/API/SBDefines.h" diff --git a/lldb/include/lldb/API/SBThread.h b/lldb/include/lldb/API/SBThread.h index 095a679..9960a22 100644 --- a/lldb/include/lldb/API/SBThread.h +++ b/lldb/include/lldb/API/SBThread.h @@ -11,7 +11,7 @@ #include "lldb/API/SBDefines.h" -#include <stdio.h> +#include <cstdio> namespace lldb { diff --git a/lldb/include/lldb/API/SBThreadPlan.h b/lldb/include/lldb/API/SBThreadPlan.h index 831452d..0d166b3 100644 --- a/lldb/include/lldb/API/SBThreadPlan.h +++ b/lldb/include/lldb/API/SBThreadPlan.h @@ -11,7 +11,7 @@ #include "lldb/API/SBDefines.h" -#include <stdio.h> +#include <cstdio> namespace lldb { diff --git a/lldb/include/lldb/Breakpoint/StoppointHitCounter.h b/lldb/include/lldb/Breakpoint/StoppointHitCounter.h index 26f816d..ae9ec6b 100644 --- a/lldb/include/lldb/Breakpoint/StoppointHitCounter.h +++ b/lldb/include/lldb/Breakpoint/StoppointHitCounter.h @@ -9,7 +9,7 @@ #ifndef LLDB_BREAKPOINT_STOPPOINT_HIT_COUNTER_H #define LLDB_BREAKPOINT_STOPPOINT_HIT_COUNTER_H -#include <assert.h> +#include <cassert> #include <cstdint> #include <limits> diff --git a/lldb/include/lldb/Core/Address.h b/lldb/include/lldb/Core/Address.h index 71e50b9..c9734e7 100644 --- a/lldb/include/lldb/Core/Address.h +++ b/lldb/include/lldb/Core/Address.h @@ -14,8 +14,8 @@ #include "lldb/lldb-private-enumerations.h" #include "lldb/lldb-types.h" -#include <stddef.h> -#include <stdint.h> +#include <cstddef> +#include <cstdint> namespace lldb_private { class Block; diff --git a/lldb/include/lldb/Core/AddressRange.h b/lldb/include/lldb/Core/AddressRange.h index d701784..f14a9e9 100644 --- a/lldb/include/lldb/Core/AddressRange.h +++ b/lldb/include/lldb/Core/AddressRange.h @@ -13,7 +13,7 @@ #include "lldb/lldb-forward.h" #include "lldb/lldb-types.h" -#include <stddef.h> +#include <cstddef> namespace lldb_private { class SectionList; diff --git a/lldb/include/lldb/Core/AddressResolver.h b/lldb/include/lldb/Core/AddressResolver.h index 9ac058a..cb571bb 100644 --- a/lldb/include/lldb/Core/AddressResolver.h +++ b/lldb/include/lldb/Core/AddressResolver.h @@ -13,7 +13,7 @@ #include "lldb/Core/SearchFilter.h" #include "lldb/lldb-defines.h" -#include <stddef.h> +#include <cstddef> #include <vector> namespace lldb_private { diff --git a/lldb/include/lldb/Core/AddressResolverFileLine.h b/lldb/include/lldb/Core/AddressResolverFileLine.h index 81375a1..e768256 100644 --- a/lldb/include/lldb/Core/AddressResolverFileLine.h +++ b/lldb/include/lldb/Core/AddressResolverFileLine.h @@ -14,7 +14,7 @@ #include "lldb/Core/SourceLocationSpec.h" #include "lldb/lldb-defines.h" -#include <stdint.h> +#include <cstdint> namespace lldb_private { class Address; diff --git a/lldb/include/lldb/Core/Communication.h b/lldb/include/lldb/Core/Communication.h index 354c4bb..930e927 100644 --- a/lldb/include/lldb/Core/Communication.h +++ b/lldb/include/lldb/Core/Communication.h @@ -22,8 +22,8 @@ #include <ratio> #include <string> -#include <stddef.h> -#include <stdint.h> +#include <cstddef> +#include <cstdint> namespace lldb_private { class Connection; diff --git a/lldb/include/lldb/Core/Debugger.h b/lldb/include/lldb/Core/Debugger.h index 7d7db39..7f25e64 100644 --- a/lldb/include/lldb/Core/Debugger.h +++ b/lldb/include/lldb/Core/Debugger.h @@ -9,7 +9,7 @@ #ifndef LLDB_CORE_DEBUGGER_H #define LLDB_CORE_DEBUGGER_H -#include <stdint.h> +#include <cstdint> #include <memory> #include <vector> @@ -42,9 +42,9 @@ #include "llvm/Support/DynamicLibrary.h" #include "llvm/Support/Threading.h" -#include <assert.h> -#include <stddef.h> -#include <stdio.h> +#include <cassert> +#include <cstddef> +#include <cstdio> namespace llvm { class raw_ostream; diff --git a/lldb/include/lldb/Core/Disassembler.h b/lldb/include/lldb/Core/Disassembler.h index 0a76f0a..e33ddcf 100644 --- a/lldb/include/lldb/Core/Disassembler.h +++ b/lldb/include/lldb/Core/Disassembler.h @@ -34,9 +34,9 @@ #include <string> #include <vector> -#include <stddef.h> -#include <stdint.h> -#include <stdio.h> +#include <cstddef> +#include <cstdint> +#include <cstdio> namespace llvm { template <typename T> class SmallVectorImpl; diff --git a/lldb/include/lldb/Core/DumpDataExtractor.h b/lldb/include/lldb/Core/DumpDataExtractor.h index 2a9d778..1218860 100644 --- a/lldb/include/lldb/Core/DumpDataExtractor.h +++ b/lldb/include/lldb/Core/DumpDataExtractor.h @@ -12,8 +12,8 @@ #include "lldb/lldb-enumerations.h" #include "lldb/lldb-types.h" -#include <stddef.h> -#include <stdint.h> +#include <cstddef> +#include <cstdint> namespace lldb_private { class DataExtractor; diff --git a/lldb/include/lldb/Core/EmulateInstruction.h b/lldb/include/lldb/Core/EmulateInstruction.h index a575488..58cd3e8 100644 --- a/lldb/include/lldb/Core/EmulateInstruction.h +++ b/lldb/include/lldb/Core/EmulateInstruction.h @@ -21,8 +21,8 @@ #include "lldb/lldb-private-types.h" #include "lldb/lldb-types.h" -#include <stddef.h> -#include <stdint.h> +#include <cstddef> +#include <cstdint> namespace lldb_private { class OptionValueDictionary; diff --git a/lldb/include/lldb/Core/FileLineResolver.h b/lldb/include/lldb/Core/FileLineResolver.h index 68e252e..d28cc11 100644 --- a/lldb/include/lldb/Core/FileLineResolver.h +++ b/lldb/include/lldb/Core/FileLineResolver.h @@ -14,7 +14,7 @@ #include "lldb/Utility/FileSpec.h" #include "lldb/lldb-defines.h" -#include <stdint.h> +#include <cstdint> namespace lldb_private { class Address; diff --git a/lldb/include/lldb/Core/FileSpecList.h b/lldb/include/lldb/Core/FileSpecList.h index 3e412a7..cab8e9b9 100644 --- a/lldb/include/lldb/Core/FileSpecList.h +++ b/lldb/include/lldb/Core/FileSpecList.h @@ -14,7 +14,7 @@ #include <vector> -#include <stddef.h> +#include <cstddef> namespace lldb_private { class Stream; diff --git a/lldb/include/lldb/Core/FormatEntity.h b/lldb/include/lldb/Core/FormatEntity.h index ca16e02..ca8ecda 100644 --- a/lldb/include/lldb/Core/FormatEntity.h +++ b/lldb/include/lldb/Core/FormatEntity.h @@ -12,8 +12,8 @@ #include "lldb/lldb-enumerations.h" #include "lldb/lldb-types.h" #include <algorithm> -#include <stddef.h> -#include <stdint.h> +#include <cstddef> +#include <cstdint> #include <string> #include <vector> diff --git a/lldb/include/lldb/Core/IOHandler.h b/lldb/include/lldb/Core/IOHandler.h index 6cb0e56..4a3b788 100644 --- a/lldb/include/lldb/Core/IOHandler.h +++ b/lldb/include/lldb/Core/IOHandler.h @@ -26,8 +26,8 @@ #include <string> #include <vector> -#include <stdint.h> -#include <stdio.h> +#include <cstdint> +#include <cstdio> namespace lldb_private { class Debugger; diff --git a/lldb/include/lldb/Core/Mangled.h b/lldb/include/lldb/Core/Mangled.h index c03fc1e..19f44c9 100644 --- a/lldb/include/lldb/Core/Mangled.h +++ b/lldb/include/lldb/Core/Mangled.h @@ -17,8 +17,8 @@ #include "llvm/ADT/StringRef.h" +#include <cstddef> #include <memory> -#include <stddef.h> namespace lldb_private { diff --git a/lldb/include/lldb/Core/MappedHash.h b/lldb/include/lldb/Core/MappedHash.h index a27ec82..58634e5 100644 --- a/lldb/include/lldb/Core/MappedHash.h +++ b/lldb/include/lldb/Core/MappedHash.h @@ -9,8 +9,8 @@ #ifndef LLDB_CORE_MAPPEDHASH_H #define LLDB_CORE_MAPPEDHASH_H -#include <assert.h> -#include <stdint.h> +#include <cassert> +#include <cstdint> #include <algorithm> #include <functional> diff --git a/lldb/include/lldb/Core/Module.h b/lldb/include/lldb/Core/Module.h index 9eb7477..c848c69 100644 --- a/lldb/include/lldb/Core/Module.h +++ b/lldb/include/lldb/Core/Module.h @@ -32,10 +32,10 @@ #include "llvm/Support/Chrono.h" #include <atomic> +#include <cstddef> +#include <cstdint> #include <memory> #include <mutex> -#include <stddef.h> -#include <stdint.h> #include <string> #include <vector> diff --git a/lldb/include/lldb/Core/ModuleList.h b/lldb/include/lldb/Core/ModuleList.h index 46a718f..46ad443 100644 --- a/lldb/include/lldb/Core/ModuleList.h +++ b/lldb/include/lldb/Core/ModuleList.h @@ -27,8 +27,8 @@ #include <mutex> #include <vector> -#include <stddef.h> -#include <stdint.h> +#include <cstddef> +#include <cstdint> namespace lldb_private { class ConstString; diff --git a/lldb/include/lldb/Core/Opcode.h b/lldb/include/lldb/Core/Opcode.h index a812ae2..005c3a4 100644 --- a/lldb/include/lldb/Core/Opcode.h +++ b/lldb/include/lldb/Core/Opcode.h @@ -14,9 +14,9 @@ #include "llvm/Support/SwapByteOrder.h" -#include <assert.h> -#include <stdint.h> -#include <string.h> +#include <cassert> +#include <cstdint> +#include <cstring> namespace lldb { class SBInstruction; diff --git a/lldb/include/lldb/Core/PluginManager.h b/lldb/include/lldb/Core/PluginManager.h index 4fc2ffe..7ddd932 100644 --- a/lldb/include/lldb/Core/PluginManager.h +++ b/lldb/include/lldb/Core/PluginManager.h @@ -19,8 +19,8 @@ #include "lldb/lldb-private-interfaces.h" #include "llvm/ADT/StringRef.h" -#include <stddef.h> -#include <stdint.h> +#include <cstddef> +#include <cstdint> #define LLDB_PLUGIN_DEFINE_ADV(ClassName, PluginName) \ namespace lldb_private { \ diff --git a/lldb/include/lldb/Core/SearchFilter.h b/lldb/include/lldb/Core/SearchFilter.h index 54dc65e..491e3dd 100644 --- a/lldb/include/lldb/Core/SearchFilter.h +++ b/lldb/include/lldb/Core/SearchFilter.h @@ -15,7 +15,7 @@ #include "lldb/Utility/FileSpec.h" #include "lldb/lldb-forward.h" -#include <stdint.h> +#include <cstdint> namespace lldb_private { class Address; diff --git a/lldb/include/lldb/Core/Section.h b/lldb/include/lldb/Core/Section.h index af2bb78..3d4ab15 100644 --- a/lldb/include/lldb/Core/Section.h +++ b/lldb/include/lldb/Core/Section.h @@ -21,8 +21,8 @@ #include <memory> #include <vector> -#include <stddef.h> -#include <stdint.h> +#include <cstddef> +#include <cstdint> namespace lldb_private { class Address; diff --git a/lldb/include/lldb/Core/SourceManager.h b/lldb/include/lldb/Core/SourceManager.h index 7549c30..5f2c1de 100644 --- a/lldb/include/lldb/Core/SourceManager.h +++ b/lldb/include/lldb/Core/SourceManager.h @@ -15,10 +15,10 @@ #include "llvm/Support/Chrono.h" +#include <cstddef> #include <cstdint> #include <map> #include <memory> -#include <stddef.h> #include <string> #include <vector> diff --git a/lldb/include/lldb/Core/StreamAsynchronousIO.h b/lldb/include/lldb/Core/StreamAsynchronousIO.h index 949a79895..30eff55 100644 --- a/lldb/include/lldb/Core/StreamAsynchronousIO.h +++ b/lldb/include/lldb/Core/StreamAsynchronousIO.h @@ -13,7 +13,7 @@ #include <string> -#include <stddef.h> +#include <cstddef> namespace lldb_private { class Debugger; diff --git a/lldb/include/lldb/Core/StreamBuffer.h b/lldb/include/lldb/Core/StreamBuffer.h index 9c48ddb..c086c72 100644 --- a/lldb/include/lldb/Core/StreamBuffer.h +++ b/lldb/include/lldb/Core/StreamBuffer.h @@ -11,7 +11,7 @@ #include "lldb/Utility/Stream.h" #include "llvm/ADT/SmallVector.h" -#include <stdio.h> +#include <cstdio> #include <string> namespace lldb_private { diff --git a/lldb/include/lldb/Core/StreamFile.h b/lldb/include/lldb/Core/StreamFile.h index e71e31e..dba4042 100644 --- a/lldb/include/lldb/Core/StreamFile.h +++ b/lldb/include/lldb/Core/StreamFile.h @@ -14,8 +14,8 @@ #include "lldb/lldb-defines.h" #include "lldb/lldb-enumerations.h" -#include <stdint.h> -#include <stdio.h> +#include <cstdint> +#include <cstdio> namespace lldb_private { diff --git a/lldb/include/lldb/Core/UserSettingsController.h b/lldb/include/lldb/Core/UserSettingsController.h index f40ad54..8fcd95b 100644 --- a/lldb/include/lldb/Core/UserSettingsController.h +++ b/lldb/include/lldb/Core/UserSettingsController.h @@ -17,8 +17,8 @@ #include <vector> -#include <stddef.h> -#include <stdint.h> +#include <cstddef> +#include <cstdint> namespace lldb_private { class CommandInterpreter; diff --git a/lldb/include/lldb/Core/Value.h b/lldb/include/lldb/Core/Value.h index bc0cbea..dced993 100644 --- a/lldb/include/lldb/Core/Value.h +++ b/lldb/include/lldb/Core/Value.h @@ -21,8 +21,8 @@ #include <vector> -#include <stdint.h> -#include <string.h> +#include <cstdint> +#include <cstring> namespace lldb_private { class DataExtractor; diff --git a/lldb/include/lldb/Core/ValueObject.h b/lldb/include/lldb/Core/ValueObject.h index ab3a908..caad961 100644 --- a/lldb/include/lldb/Core/ValueObject.h +++ b/lldb/include/lldb/Core/ValueObject.h @@ -37,8 +37,8 @@ #include <string> #include <utility> -#include <stddef.h> -#include <stdint.h> +#include <cstddef> +#include <cstdint> namespace lldb_private { class Declaration; diff --git a/lldb/include/lldb/Core/ValueObjectCast.h b/lldb/include/lldb/Core/ValueObjectCast.h index 8205c6f..84cf1335 100644 --- a/lldb/include/lldb/Core/ValueObjectCast.h +++ b/lldb/include/lldb/Core/ValueObjectCast.h @@ -15,8 +15,8 @@ #include "lldb/lldb-enumerations.h" #include "lldb/lldb-forward.h" -#include <stddef.h> -#include <stdint.h> +#include <cstddef> +#include <cstdint> namespace lldb_private { class ConstString; diff --git a/lldb/include/lldb/Core/ValueObjectChild.h b/lldb/include/lldb/Core/ValueObjectChild.h index 437d81a..8a7a7f1 100644 --- a/lldb/include/lldb/Core/ValueObjectChild.h +++ b/lldb/include/lldb/Core/ValueObjectChild.h @@ -20,8 +20,8 @@ #include "llvm/ADT/Optional.h" -#include <stddef.h> -#include <stdint.h> +#include <cstddef> +#include <cstdint> namespace lldb_private { diff --git a/lldb/include/lldb/Core/ValueObjectConstResult.h b/lldb/include/lldb/Core/ValueObjectConstResult.h index 843eb96..58cda6f 100644 --- a/lldb/include/lldb/Core/ValueObjectConstResult.h +++ b/lldb/include/lldb/Core/ValueObjectConstResult.h @@ -21,8 +21,8 @@ #include "lldb/lldb-private-enumerations.h" #include "lldb/lldb-types.h" -#include <stddef.h> -#include <stdint.h> +#include <cstddef> +#include <cstdint> namespace lldb_private { class DataExtractor; diff --git a/lldb/include/lldb/Core/ValueObjectConstResultCast.h b/lldb/include/lldb/Core/ValueObjectConstResultCast.h index ba81785..5467ce3d 100644 --- a/lldb/include/lldb/Core/ValueObjectConstResultCast.h +++ b/lldb/include/lldb/Core/ValueObjectConstResultCast.h @@ -17,8 +17,8 @@ #include "lldb/lldb-forward.h" #include "lldb/lldb-types.h" -#include <stddef.h> -#include <stdint.h> +#include <cstddef> +#include <cstdint> namespace lldb_private { class DataExtractor; diff --git a/lldb/include/lldb/Core/ValueObjectConstResultChild.h b/lldb/include/lldb/Core/ValueObjectConstResultChild.h index b3606bf..26bd9f3 100644 --- a/lldb/include/lldb/Core/ValueObjectConstResultChild.h +++ b/lldb/include/lldb/Core/ValueObjectConstResultChild.h @@ -17,8 +17,8 @@ #include "lldb/lldb-forward.h" #include "lldb/lldb-types.h" -#include <stddef.h> -#include <stdint.h> +#include <cstddef> +#include <cstdint> namespace lldb_private { class DataExtractor; diff --git a/lldb/include/lldb/Core/ValueObjectConstResultImpl.h b/lldb/include/lldb/Core/ValueObjectConstResultImpl.h index 757684d1..2536c51 100644 --- a/lldb/include/lldb/Core/ValueObjectConstResultImpl.h +++ b/lldb/include/lldb/Core/ValueObjectConstResultImpl.h @@ -15,8 +15,8 @@ #include "lldb/lldb-private-enumerations.h" #include "lldb/lldb-types.h" -#include <stddef.h> -#include <stdint.h> +#include <cstddef> +#include <cstdint> namespace lldb_private { class CompilerType; class DataExtractor; diff --git a/lldb/include/lldb/Core/ValueObjectDynamicValue.h b/lldb/include/lldb/Core/ValueObjectDynamicValue.h index 7e6af70..8822a1d 100644 --- a/lldb/include/lldb/Core/ValueObjectDynamicValue.h +++ b/lldb/include/lldb/Core/ValueObjectDynamicValue.h @@ -19,9 +19,9 @@ #include "lldb/lldb-forward.h" #include "lldb/lldb-private-enumerations.h" -#include <assert.h> -#include <stddef.h> -#include <stdint.h> +#include <cassert> +#include <cstddef> +#include <cstdint> namespace lldb_private { class DataExtractor; diff --git a/lldb/include/lldb/Core/ValueObjectList.h b/lldb/include/lldb/Core/ValueObjectList.h index 9bfccff..fcb358e 100644 --- a/lldb/include/lldb/Core/ValueObjectList.h +++ b/lldb/include/lldb/Core/ValueObjectList.h @@ -14,7 +14,7 @@ #include <vector> -#include <stddef.h> +#include <cstddef> namespace lldb_private { class ValueObject; diff --git a/lldb/include/lldb/Core/ValueObjectMemory.h b/lldb/include/lldb/Core/ValueObjectMemory.h index 1ce9e50..83671a7 100644 --- a/lldb/include/lldb/Core/ValueObjectMemory.h +++ b/lldb/include/lldb/Core/ValueObjectMemory.h @@ -18,8 +18,8 @@ #include "lldb/lldb-forward.h" #include "llvm/ADT/StringRef.h" -#include <stddef.h> -#include <stdint.h> +#include <cstddef> +#include <cstdint> namespace lldb_private { class ExecutionContextScope; diff --git a/lldb/include/lldb/Core/ValueObjectRegister.h b/lldb/include/lldb/Core/ValueObjectRegister.h index 3968584..e210b36 100644 --- a/lldb/include/lldb/Core/ValueObjectRegister.h +++ b/lldb/include/lldb/Core/ValueObjectRegister.h @@ -18,8 +18,8 @@ #include "lldb/lldb-forward.h" #include "lldb/lldb-private-types.h" -#include <stddef.h> -#include <stdint.h> +#include <cstddef> +#include <cstdint> namespace lldb_private { class DataExtractor; diff --git a/lldb/include/lldb/Core/ValueObjectSyntheticFilter.h b/lldb/include/lldb/Core/ValueObjectSyntheticFilter.h index a4148a21..f7a2330 100644 --- a/lldb/include/lldb/Core/ValueObjectSyntheticFilter.h +++ b/lldb/include/lldb/Core/ValueObjectSyntheticFilter.h @@ -20,7 +20,7 @@ #include <cstdint> #include <memory> -#include <stddef.h> +#include <cstddef> namespace lldb_private { class Declaration; diff --git a/lldb/include/lldb/Core/ValueObjectVariable.h b/lldb/include/lldb/Core/ValueObjectVariable.h index 95955d6..cbf7e5b 100644 --- a/lldb/include/lldb/Core/ValueObjectVariable.h +++ b/lldb/include/lldb/Core/ValueObjectVariable.h @@ -18,8 +18,8 @@ #include "lldb/lldb-enumerations.h" #include "lldb/lldb-forward.h" -#include <stddef.h> -#include <stdint.h> +#include <cstddef> +#include <cstdint> namespace lldb_private { class DataExtractor; diff --git a/lldb/include/lldb/Core/dwarf.h b/lldb/include/lldb/Core/dwarf.h index cd9cf24..bdb6f27 100644 --- a/lldb/include/lldb/Core/dwarf.h +++ b/lldb/include/lldb/Core/dwarf.h @@ -10,7 +10,7 @@ #define LLDB_CORE_DWARF_H #include "lldb/Utility/RangeMap.h" -#include <stdint.h> +#include <cstdint> // Get the DWARF constant definitions from llvm #include "llvm/BinaryFormat/Dwarf.h" diff --git a/lldb/include/lldb/DataFormatters/TypeSummary.h b/lldb/include/lldb/DataFormatters/TypeSummary.h index ce3195db..48480d1d 100644 --- a/lldb/include/lldb/DataFormatters/TypeSummary.h +++ b/lldb/include/lldb/DataFormatters/TypeSummary.h @@ -9,7 +9,7 @@ #ifndef LLDB_DATAFORMATTERS_TYPESUMMARY_H #define LLDB_DATAFORMATTERS_TYPESUMMARY_H -#include <stdint.h> +#include <cstdint> #include <functional> #include <memory> diff --git a/lldb/include/lldb/DataFormatters/TypeSynthetic.h b/lldb/include/lldb/DataFormatters/TypeSynthetic.h index fa14582..ea49e48 100644 --- a/lldb/include/lldb/DataFormatters/TypeSynthetic.h +++ b/lldb/include/lldb/DataFormatters/TypeSynthetic.h @@ -9,7 +9,7 @@ #ifndef LLDB_DATAFORMATTERS_TYPESYNTHETIC_H #define LLDB_DATAFORMATTERS_TYPESYNTHETIC_H -#include <stdint.h> +#include <cstdint> #include <functional> #include <initializer_list> diff --git a/lldb/include/lldb/Host/File.h b/lldb/include/lldb/Host/File.h index d205a3f..28d5d9d 100644 --- a/lldb/include/lldb/Host/File.h +++ b/lldb/include/lldb/Host/File.h @@ -15,9 +15,9 @@ #include "lldb/lldb-private.h" #include "llvm/ADT/BitmaskEnum.h" +#include <cstdarg> +#include <cstdio> #include <mutex> -#include <stdarg.h> -#include <stdio.h> #include <sys/types.h> namespace lldb_private { diff --git a/lldb/include/lldb/Host/FileCache.h b/lldb/include/lldb/Host/FileCache.h index df0d9a8..52baa64 100644 --- a/lldb/include/lldb/Host/FileCache.h +++ b/lldb/include/lldb/Host/FileCache.h @@ -8,8 +8,8 @@ #ifndef LLDB_HOST_FILECACHE_H #define LLDB_HOST_FILECACHE_H +#include <cstdint> #include <map> -#include <stdint.h> #include "lldb/lldb-forward.h" #include "lldb/lldb-types.h" diff --git a/lldb/include/lldb/Host/FileSystem.h b/lldb/include/lldb/Host/FileSystem.h index 02ff5f3..02eba477 100644 --- a/lldb/include/lldb/Host/FileSystem.h +++ b/lldb/include/lldb/Host/FileSystem.h @@ -21,8 +21,8 @@ #include "lldb/lldb-types.h" -#include <stdint.h> -#include <stdio.h> +#include <cstdint> +#include <cstdio> #include <sys/stat.h> namespace lldb_private { diff --git a/lldb/include/lldb/Host/Host.h b/lldb/include/lldb/Host/Host.h index 76792cc..1fdf7ea 100644 --- a/lldb/include/lldb/Host/Host.h +++ b/lldb/include/lldb/Host/Host.h @@ -17,8 +17,8 @@ #include "lldb/lldb-private-forward.h" #include "lldb/lldb-private.h" #include <cerrno> +#include <cstdarg> #include <map> -#include <stdarg.h> #include <string> #include <type_traits> diff --git a/lldb/include/lldb/Host/HostInfoBase.h b/lldb/include/lldb/Host/HostInfoBase.h index b4fbd88..f5c84ac 100644 --- a/lldb/include/lldb/Host/HostInfoBase.h +++ b/lldb/include/lldb/Host/HostInfoBase.h @@ -17,7 +17,7 @@ #include "lldb/lldb-enumerations.h" #include "llvm/ADT/StringRef.h" -#include <stdint.h> +#include <cstdint> #include <string> diff --git a/lldb/include/lldb/Host/ProcessRunLock.h b/lldb/include/lldb/Host/ProcessRunLock.h index 43463d1..56c8d91 100644 --- a/lldb/include/lldb/Host/ProcessRunLock.h +++ b/lldb/include/lldb/Host/ProcessRunLock.h @@ -9,8 +9,8 @@ #ifndef LLDB_HOST_PROCESSRUNLOCK_H #define LLDB_HOST_PROCESSRUNLOCK_H -#include <stdint.h> -#include <time.h> +#include <cstdint> +#include <ctime> #include "lldb/lldb-defines.h" diff --git a/lldb/include/lldb/Host/SocketAddress.h b/lldb/include/lldb/Host/SocketAddress.h index 862e110..c88cc12 100644 --- a/lldb/include/lldb/Host/SocketAddress.h +++ b/lldb/include/lldb/Host/SocketAddress.h @@ -9,7 +9,7 @@ #ifndef LLDB_HOST_SOCKETADDRESS_H #define LLDB_HOST_SOCKETADDRESS_H -#include <stdint.h> +#include <cstdint> #ifdef _WIN32 #include "lldb/Host/windows/windows.h" diff --git a/lldb/include/lldb/Host/StringConvert.h b/lldb/include/lldb/Host/StringConvert.h index ad629ff..33608a8 100644 --- a/lldb/include/lldb/Host/StringConvert.h +++ b/lldb/include/lldb/Host/StringConvert.h @@ -9,9 +9,7 @@ #ifndef LLDB_HOST_STRINGCONVERT_H #define LLDB_HOST_STRINGCONVERT_H -#include <stdint.h> - - +#include <cstdint> namespace lldb_private { diff --git a/lldb/include/lldb/Host/Time.h b/lldb/include/lldb/Host/Time.h index 83b76ec..aee4c43 100644 --- a/lldb/include/lldb/Host/Time.h +++ b/lldb/include/lldb/Host/Time.h @@ -19,7 +19,7 @@ #include <time64.h> extern time_t timegm(struct tm *t); #else -#include <time.h> +#include <ctime> #endif #endif // LLDB_HOST_TIME_H diff --git a/lldb/include/lldb/Host/windows/PosixApi.h b/lldb/include/lldb/Host/windows/PosixApi.h index aee7394..26398ac 100644 --- a/lldb/include/lldb/Host/windows/PosixApi.h +++ b/lldb/include/lldb/Host/windows/PosixApi.h @@ -16,10 +16,10 @@ #endif // va_start, va_end, etc macros. -#include <stdarg.h> +#include <cstdarg> // time_t, timespec, etc. -#include <time.h> +#include <ctime> #ifndef PATH_MAX #define PATH_MAX 32768 @@ -68,7 +68,7 @@ #ifdef _MSC_VER // PRIxxx format macros for printf() -#include <inttypes.h> +#include <cinttypes> // open(), close(), creat(), etc. #include <io.h> diff --git a/lldb/include/lldb/Symbol/LocateSymbolFile.h b/lldb/include/lldb/Symbol/LocateSymbolFile.h index 93b76e5..2c3f6a7b 100644 --- a/lldb/include/lldb/Symbol/LocateSymbolFile.h +++ b/lldb/include/lldb/Symbol/LocateSymbolFile.h @@ -9,7 +9,7 @@ #ifndef LLDB_SYMBOL_LOCATESYMBOLFILE_H #define LLDB_SYMBOL_LOCATESYMBOLFILE_H -#include <stdint.h> +#include <cstdint> #include "lldb/Core/FileSpecList.h" #include "lldb/Utility/FileSpec.h" diff --git a/lldb/include/lldb/Target/DynamicLoader.h b/lldb/include/lldb/Target/DynamicLoader.h index 1e4038b..a904fac 100644 --- a/lldb/include/lldb/Target/DynamicLoader.h +++ b/lldb/include/lldb/Target/DynamicLoader.h @@ -18,8 +18,8 @@ #include "lldb/lldb-private-enumerations.h" #include "lldb/lldb-types.h" -#include <stddef.h> -#include <stdint.h> +#include <cstddef> +#include <cstdint> namespace lldb_private { class ModuleList; class Process; diff --git a/lldb/include/lldb/Target/Process.h b/lldb/include/lldb/Target/Process.h index 0a2a6f6..f6a5386 100644 --- a/lldb/include/lldb/Target/Process.h +++ b/lldb/include/lldb/Target/Process.h @@ -11,7 +11,7 @@ #include "lldb/Host/Config.h" -#include <limits.h> +#include <climits> #include <chrono> #include <list> diff --git a/lldb/include/lldb/Utility/Connection.h b/lldb/include/lldb/Utility/Connection.h index 39e6e40..0b587b8 100644 --- a/lldb/include/lldb/Utility/Connection.h +++ b/lldb/include/lldb/Utility/Connection.h @@ -18,7 +18,7 @@ #include <ratio> #include <string> -#include <stddef.h> +#include <cstddef> namespace lldb_private { class Status; diff --git a/lldb/include/lldb/Utility/ConstString.h b/lldb/include/lldb/Utility/ConstString.h index 8a67faf..52d3556 100644 --- a/lldb/include/lldb/Utility/ConstString.h +++ b/lldb/include/lldb/Utility/ConstString.h @@ -14,7 +14,7 @@ #include "llvm/Support/FormatVariadic.h" #include "llvm/Support/YAMLTraits.h" -#include <stddef.h> +#include <cstddef> namespace lldb_private { class Stream; diff --git a/lldb/include/lldb/Utility/DataBuffer.h b/lldb/include/lldb/Utility/DataBuffer.h index 302b133..b82e6f8 100644 --- a/lldb/include/lldb/Utility/DataBuffer.h +++ b/lldb/include/lldb/Utility/DataBuffer.h @@ -10,8 +10,8 @@ #define LLDB_UTILITY_DATABUFFER_H #if defined(__cplusplus) -#include <stdint.h> -#include <string.h> +#include <cstdint> +#include <cstring> #include "lldb/lldb-types.h" diff --git a/lldb/include/lldb/Utility/DataBufferLLVM.h b/lldb/include/lldb/Utility/DataBufferLLVM.h index 4dc800c..abb1bb40 100644 --- a/lldb/include/lldb/Utility/DataBufferLLVM.h +++ b/lldb/include/lldb/Utility/DataBufferLLVM.h @@ -12,8 +12,8 @@ #include "lldb/Utility/DataBuffer.h" #include "lldb/lldb-types.h" +#include <cstdint> #include <memory> -#include <stdint.h> namespace llvm { class WritableMemoryBuffer; diff --git a/lldb/include/lldb/Utility/DataEncoder.h b/lldb/include/lldb/Utility/DataEncoder.h index 8edec54..64e75f9 100644 --- a/lldb/include/lldb/Utility/DataEncoder.h +++ b/lldb/include/lldb/Utility/DataEncoder.h @@ -16,8 +16,8 @@ #include "lldb/lldb-forward.h" #include "lldb/lldb-types.h" -#include <stddef.h> -#include <stdint.h> +#include <cstddef> +#include <cstdint> namespace lldb_private { diff --git a/lldb/include/lldb/Utility/DataExtractor.h b/lldb/include/lldb/Utility/DataExtractor.h index 0210af5..d4d9200 100644 --- a/lldb/include/lldb/Utility/DataExtractor.h +++ b/lldb/include/lldb/Utility/DataExtractor.h @@ -19,8 +19,8 @@ #include "llvm/Support/SwapByteOrder.h" #include <cassert> -#include <stdint.h> -#include <string.h> +#include <cstdint> +#include <cstring> namespace lldb_private { class Log; diff --git a/lldb/include/lldb/Utility/Endian.h b/lldb/include/lldb/Utility/Endian.h index 1d1f8fa..7822dfa 100644 --- a/lldb/include/lldb/Utility/Endian.h +++ b/lldb/include/lldb/Utility/Endian.h @@ -11,7 +11,7 @@ #include "lldb/lldb-enumerations.h" -#include <stdint.h> +#include <cstdint> namespace lldb_private { diff --git a/lldb/include/lldb/Utility/Event.h b/lldb/include/lldb/Utility/Event.h index 06c0262..27a0874 100644 --- a/lldb/include/lldb/Utility/Event.h +++ b/lldb/include/lldb/Utility/Event.h @@ -22,8 +22,8 @@ #include <memory> #include <string> -#include <stddef.h> -#include <stdint.h> +#include <cstddef> +#include <cstdint> namespace lldb_private { class Event; diff --git a/lldb/include/lldb/Utility/FileSpec.h b/lldb/include/lldb/Utility/FileSpec.h index ef76808..0f4e650 100644 --- a/lldb/include/lldb/Utility/FileSpec.h +++ b/lldb/include/lldb/Utility/FileSpec.h @@ -20,8 +20,8 @@ #include "llvm/Support/Path.h" #include "llvm/Support/YAMLTraits.h" -#include <stddef.h> -#include <stdint.h> +#include <cstddef> +#include <cstdint> namespace lldb_private { class Stream; diff --git a/lldb/include/lldb/Utility/GDBRemote.h b/lldb/include/lldb/Utility/GDBRemote.h index 2ee706e..f760859 100644 --- a/lldb/include/lldb/Utility/GDBRemote.h +++ b/lldb/include/lldb/Utility/GDBRemote.h @@ -17,8 +17,8 @@ #include "llvm/Support/YAMLTraits.h" #include "llvm/Support/raw_ostream.h" -#include <stddef.h> -#include <stdint.h> +#include <cstddef> +#include <cstdint> #include <string> #include <vector> diff --git a/lldb/include/lldb/Utility/IOObject.h b/lldb/include/lldb/Utility/IOObject.h index 9b2b9cf..8cf4299 100644 --- a/lldb/include/lldb/Utility/IOObject.h +++ b/lldb/include/lldb/Utility/IOObject.h @@ -9,8 +9,8 @@ #ifndef LLDB_UTILITY_IOOBJECT_H #define LLDB_UTILITY_IOOBJECT_H -#include <stdarg.h> -#include <stdio.h> +#include <cstdarg> +#include <cstdio> #include <sys/types.h> #include "lldb/lldb-private.h" diff --git a/lldb/include/lldb/Utility/Listener.h b/lldb/include/lldb/Utility/Listener.h index 9d96e36c5..d70e778c 100644 --- a/lldb/include/lldb/Utility/Listener.h +++ b/lldb/include/lldb/Utility/Listener.h @@ -23,8 +23,8 @@ #include <string> #include <vector> -#include <stddef.h> -#include <stdint.h> +#include <cstddef> +#include <cstdint> namespace lldb_private { class ConstString; diff --git a/lldb/include/lldb/Utility/Predicate.h b/lldb/include/lldb/Utility/Predicate.h index a17ac05..af16abc 100644 --- a/lldb/include/lldb/Utility/Predicate.h +++ b/lldb/include/lldb/Utility/Predicate.h @@ -9,8 +9,8 @@ #ifndef LLDB_UTILITY_PREDICATE_H #define LLDB_UTILITY_PREDICATE_H -#include <stdint.h> -#include <time.h> +#include <cstdint> +#include <ctime> #include <condition_variable> #include <mutex> diff --git a/lldb/include/lldb/Utility/Status.h b/lldb/include/lldb/Utility/Status.h index 9babad1..b5f90be 100644 --- a/lldb/include/lldb/Utility/Status.h +++ b/lldb/include/lldb/Utility/Status.h @@ -15,7 +15,7 @@ #include "llvm/Support/Error.h" #include "llvm/Support/FormatVariadic.h" #include <cstdarg> -#include <stdint.h> +#include <cstdint> #include <string> #include <system_error> #include <type_traits> diff --git a/lldb/include/lldb/Utility/Stream.h b/lldb/include/lldb/Utility/Stream.h index e7f065a..a5422f5 100644 --- a/lldb/include/lldb/Utility/Stream.h +++ b/lldb/include/lldb/Utility/Stream.h @@ -16,9 +16,9 @@ #include "llvm/Support/FormatVariadic.h" #include "llvm/Support/raw_ostream.h" -#include <stdarg.h> -#include <stddef.h> -#include <stdint.h> +#include <cstdarg> +#include <cstddef> +#include <cstdint> #include <type_traits> namespace lldb_private { diff --git a/lldb/include/lldb/Utility/StreamCallback.h b/lldb/include/lldb/Utility/StreamCallback.h index d6d74fb..d234cbe 100644 --- a/lldb/include/lldb/Utility/StreamCallback.h +++ b/lldb/include/lldb/Utility/StreamCallback.h @@ -12,8 +12,8 @@ #include "lldb/lldb-types.h" #include "llvm/Support/raw_ostream.h" -#include <stddef.h> -#include <stdint.h> +#include <cstddef> +#include <cstdint> namespace lldb_private { diff --git a/lldb/include/lldb/Utility/StreamString.h b/lldb/include/lldb/Utility/StreamString.h index b0be0f7..4c568ac 100644 --- a/lldb/include/lldb/Utility/StreamString.h +++ b/lldb/include/lldb/Utility/StreamString.h @@ -15,8 +15,8 @@ #include <string> -#include <stddef.h> -#include <stdint.h> +#include <cstddef> +#include <cstdint> namespace lldb_private { diff --git a/lldb/include/lldb/Utility/StreamTee.h b/lldb/include/lldb/Utility/StreamTee.h index 2995bc0..cf410cb 100644 --- a/lldb/include/lldb/Utility/StreamTee.h +++ b/lldb/include/lldb/Utility/StreamTee.h @@ -9,7 +9,7 @@ #ifndef LLDB_UTILITY_STREAMTEE_H #define LLDB_UTILITY_STREAMTEE_H -#include <limits.h> +#include <climits> #include <mutex> diff --git a/lldb/include/lldb/Utility/StringExtractor.h b/lldb/include/lldb/Utility/StringExtractor.h index 6a5bb24..996e59e 100644 --- a/lldb/include/lldb/Utility/StringExtractor.h +++ b/lldb/include/lldb/Utility/StringExtractor.h @@ -12,8 +12,8 @@ #include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/StringRef.h" -#include <stddef.h> -#include <stdint.h> +#include <cstddef> +#include <cstdint> #include <string> class StringExtractor { diff --git a/lldb/include/lldb/Utility/StringExtractorGDBRemote.h b/lldb/include/lldb/Utility/StringExtractorGDBRemote.h index da73708..bf99593 100644 --- a/lldb/include/lldb/Utility/StringExtractorGDBRemote.h +++ b/lldb/include/lldb/Utility/StringExtractorGDBRemote.h @@ -15,8 +15,8 @@ #include <string> -#include <stddef.h> -#include <stdint.h> +#include <cstddef> +#include <cstdint> class StringExtractorGDBRemote : public StringExtractor { public: diff --git a/lldb/include/lldb/Utility/StringList.h b/lldb/include/lldb/Utility/StringList.h index 34930ab..70f4654 100644 --- a/lldb/include/lldb/Utility/StringList.h +++ b/lldb/include/lldb/Utility/StringList.h @@ -11,7 +11,7 @@ #include "llvm/ADT/StringRef.h" -#include <stddef.h> +#include <cstddef> #include <string> #include <vector> diff --git a/lldb/include/lldb/Utility/Timer.h b/lldb/include/lldb/Utility/Timer.h index 0249c69..2b39881 100644 --- a/lldb/include/lldb/Utility/Timer.h +++ b/lldb/include/lldb/Utility/Timer.h @@ -12,7 +12,7 @@ #include "lldb/lldb-defines.h" #include "llvm/Support/Chrono.h" #include <atomic> -#include <stdint.h> +#include <cstdint> namespace lldb_private { class Stream; diff --git a/lldb/include/lldb/Utility/UUID.h b/lldb/include/lldb/Utility/UUID.h index f2107d9..1c7c047 100644 --- a/lldb/include/lldb/Utility/UUID.h +++ b/lldb/include/lldb/Utility/UUID.h @@ -12,8 +12,8 @@ #include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/StringRef.h" #include "llvm/Support/Endian.h" -#include <stddef.h> -#include <stdint.h> +#include <cstddef> +#include <cstdint> #include <string> namespace lldb_private { diff --git a/lldb/include/lldb/Utility/VMRange.h b/lldb/include/lldb/Utility/VMRange.h index 4b01cd8..d1dfa3a 100644 --- a/lldb/include/lldb/Utility/VMRange.h +++ b/lldb/include/lldb/Utility/VMRange.h @@ -12,8 +12,8 @@ #include "lldb/lldb-types.h" #include "llvm/Support/raw_ostream.h" -#include <stddef.h> -#include <stdint.h> +#include <cstddef> +#include <cstdint> #include <vector> namespace lldb_private { diff --git a/lldb/include/lldb/lldb-types.h b/lldb/include/lldb/lldb-types.h index c3e2f07..976da35 100644 --- a/lldb/include/lldb/lldb-types.h +++ b/lldb/include/lldb/lldb-types.h @@ -12,7 +12,7 @@ #include "lldb/lldb-enumerations.h" #include "lldb/lldb-forward.h" -#include <stdint.h> +#include <cstdint> // All host systems must define: // lldb::thread_t The native thread type for spawned threads on the 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; diff --git a/lldb/tools/darwin-debug/darwin-debug.cpp b/lldb/tools/darwin-debug/darwin-debug.cpp index b184cb5..435a3d1 100644 --- a/lldb/tools/darwin-debug/darwin-debug.cpp +++ b/lldb/tools/darwin-debug/darwin-debug.cpp @@ -21,15 +21,15 @@ // on other systems. #if defined(__APPLE__) +#include <climits> #include <crt_externs.h> +#include <csignal> +#include <cstdio> +#include <cstdlib> +#include <cstring> #include <getopt.h> -#include <limits.h> #include <mach/machine.h> -#include <signal.h> #include <spawn.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> #include <sys/socket.h> #include <sys/stat.h> #include <sys/types.h> diff --git a/lldb/tools/debugserver/source/DNB.cpp b/lldb/tools/debugserver/source/DNB.cpp index 37c8cf5e..858e6af 100644 --- a/lldb/tools/debugserver/source/DNB.cpp +++ b/lldb/tools/debugserver/source/DNB.cpp @@ -11,12 +11,12 @@ //===----------------------------------------------------------------------===// #include "DNB.h" -#include <inttypes.h> +#include <cinttypes> +#include <csignal> +#include <cstdio> +#include <cstdlib> #include <libproc.h> #include <map> -#include <signal.h> -#include <stdio.h> -#include <stdlib.h> #include <sys/resource.h> #include <sys/stat.h> #include <sys/sysctl.h> diff --git a/lldb/tools/debugserver/source/DNBArch.cpp b/lldb/tools/debugserver/source/DNBArch.cpp index f3848bc..54a055d 100644 --- a/lldb/tools/debugserver/source/DNBArch.cpp +++ b/lldb/tools/debugserver/source/DNBArch.cpp @@ -11,7 +11,7 @@ //===----------------------------------------------------------------------===// #include "DNBArch.h" -#include <assert.h> +#include <cassert> #include <mach/mach.h> #include <map> diff --git a/lldb/tools/debugserver/source/DNBArch.h b/lldb/tools/debugserver/source/DNBArch.h index 1bea583..b673e40 100644 --- a/lldb/tools/debugserver/source/DNBArch.h +++ b/lldb/tools/debugserver/source/DNBArch.h @@ -16,8 +16,8 @@ #include "DNBDefs.h" #include "MacOSX/MachException.h" +#include <cstdio> #include <mach/mach.h> -#include <stdio.h> struct DNBRegisterValue; struct DNBRegisterSetInfo; diff --git a/lldb/tools/debugserver/source/DNBBreakpoint.cpp b/lldb/tools/debugserver/source/DNBBreakpoint.cpp index 890bde0..9f402b4 100644 --- a/lldb/tools/debugserver/source/DNBBreakpoint.cpp +++ b/lldb/tools/debugserver/source/DNBBreakpoint.cpp @@ -14,8 +14,8 @@ #include "DNBLog.h" #include "MachProcess.h" #include <algorithm> -#include <assert.h> -#include <inttypes.h> +#include <cassert> +#include <cinttypes> #pragma mark-- DNBBreakpoint DNBBreakpoint::DNBBreakpoint(nub_addr_t addr, nub_size_t byte_size, diff --git a/lldb/tools/debugserver/source/DNBDataRef.cpp b/lldb/tools/debugserver/source/DNBDataRef.cpp index f19c913..c6355f1 100644 --- a/lldb/tools/debugserver/source/DNBDataRef.cpp +++ b/lldb/tools/debugserver/source/DNBDataRef.cpp @@ -12,8 +12,8 @@ #include "DNBDataRef.h" #include "DNBLog.h" -#include <assert.h> -#include <ctype.h> +#include <cassert> +#include <cctype> #include <libkern/OSByteOrder.h> // Constructor diff --git a/lldb/tools/debugserver/source/DNBDataRef.h b/lldb/tools/debugserver/source/DNBDataRef.h index 4a79dc4..c8688eb 100644 --- a/lldb/tools/debugserver/source/DNBDataRef.h +++ b/lldb/tools/debugserver/source/DNBDataRef.h @@ -23,10 +23,10 @@ #define LLDB_TOOLS_DEBUGSERVER_SOURCE_DNBDATAREF_H #include "DNBDefs.h" -#include <limits.h> -#include <stdint.h> -#include <stdio.h> -#include <string.h> +#include <climits> +#include <cstdint> +#include <cstdio> +#include <cstring> class DNBDataRef { public: diff --git a/lldb/tools/debugserver/source/DNBDefs.h b/lldb/tools/debugserver/source/DNBDefs.h index 49f8d6d..c6b8945 100644 --- a/lldb/tools/debugserver/source/DNBDefs.h +++ b/lldb/tools/debugserver/source/DNBDefs.h @@ -13,9 +13,9 @@ #ifndef LLDB_TOOLS_DEBUGSERVER_SOURCE_DNBDEFS_H #define LLDB_TOOLS_DEBUGSERVER_SOURCE_DNBDEFS_H -#include <signal.h> -#include <stdint.h> -#include <stdio.h> +#include <csignal> +#include <cstdint> +#include <cstdio> #include <sys/syslimits.h> #include <unistd.h> diff --git a/lldb/tools/debugserver/source/DNBError.h b/lldb/tools/debugserver/source/DNBError.h index 8da3f6c..9b6b0c7 100644 --- a/lldb/tools/debugserver/source/DNBError.h +++ b/lldb/tools/debugserver/source/DNBError.h @@ -13,9 +13,9 @@ #ifndef LLDB_TOOLS_DEBUGSERVER_SOURCE_DNBERROR_H #define LLDB_TOOLS_DEBUGSERVER_SOURCE_DNBERROR_H -#include <errno.h> +#include <cerrno> +#include <cstdio> #include <mach/mach.h> -#include <stdio.h> #include <string> class DNBError { diff --git a/lldb/tools/debugserver/source/DNBLog.cpp b/lldb/tools/debugserver/source/DNBLog.cpp index 11b2d0a..d3045ac 100644 --- a/lldb/tools/debugserver/source/DNBLog.cpp +++ b/lldb/tools/debugserver/source/DNBLog.cpp @@ -18,11 +18,11 @@ static int g_verbose = 0; #if defined(DNBLOG_ENABLED) #include "PThreadMutex.h" +#include <cstdarg> +#include <cstdio> +#include <cstdlib> #include <mach/mach.h> #include <pthread.h> -#include <stdarg.h> -#include <stdio.h> -#include <stdlib.h> #include <sys/time.h> #include <unistd.h> diff --git a/lldb/tools/debugserver/source/DNBLog.h b/lldb/tools/debugserver/source/DNBLog.h index 6a3e34c..3b17b46 100644 --- a/lldb/tools/debugserver/source/DNBLog.h +++ b/lldb/tools/debugserver/source/DNBLog.h @@ -14,8 +14,8 @@ #define LLDB_TOOLS_DEBUGSERVER_SOURCE_DNBLOG_H #include "DNBDefs.h" -#include <stdint.h> -#include <stdio.h> +#include <cstdint> +#include <cstdio> #ifdef __cplusplus extern "C" { diff --git a/lldb/tools/debugserver/source/DNBRegisterInfo.cpp b/lldb/tools/debugserver/source/DNBRegisterInfo.cpp index c224fc7..e6b8e1b 100644 --- a/lldb/tools/debugserver/source/DNBRegisterInfo.cpp +++ b/lldb/tools/debugserver/source/DNBRegisterInfo.cpp @@ -12,7 +12,7 @@ #include "DNBRegisterInfo.h" #include "DNBLog.h" -#include <string.h> +#include <cstring> DNBRegisterValueClass::DNBRegisterValueClass(const DNBRegisterInfo *regInfo) { Clear(); diff --git a/lldb/tools/debugserver/source/DNBRegisterInfo.h b/lldb/tools/debugserver/source/DNBRegisterInfo.h index c17ce3a..05992b9 100644 --- a/lldb/tools/debugserver/source/DNBRegisterInfo.h +++ b/lldb/tools/debugserver/source/DNBRegisterInfo.h @@ -14,8 +14,8 @@ #define LLDB_TOOLS_DEBUGSERVER_SOURCE_DNBREGISTERINFO_H #include "DNBDefs.h" -#include <stdint.h> -#include <stdio.h> +#include <cstdint> +#include <cstdio> struct DNBRegisterValueClass : public DNBRegisterValue { #ifdef __cplusplus diff --git a/lldb/tools/debugserver/source/DNBTimer.h b/lldb/tools/debugserver/source/DNBTimer.h index 8023249..a6570b2 100644 --- a/lldb/tools/debugserver/source/DNBTimer.h +++ b/lldb/tools/debugserver/source/DNBTimer.h @@ -15,8 +15,8 @@ #include "DNBDefs.h" #include "PThreadMutex.h" +#include <cstdint> #include <memory> -#include <stdint.h> #include <sys/time.h> class DNBTimer { diff --git a/lldb/tools/debugserver/source/JSON.cpp b/lldb/tools/debugserver/source/JSON.cpp index 12d96d4..5eff683 100644 --- a/lldb/tools/debugserver/source/JSON.cpp +++ b/lldb/tools/debugserver/source/JSON.cpp @@ -9,8 +9,8 @@ #include "JSON.h" // C includes -#include <assert.h> -#include <limits.h> +#include <cassert> +#include <climits> // C++ includes #include "lldb/Host/StringConvert.h" diff --git a/lldb/tools/debugserver/source/JSON.h b/lldb/tools/debugserver/source/JSON.h index 5bcc67c..b2214d4 100644 --- a/lldb/tools/debugserver/source/JSON.h +++ b/lldb/tools/debugserver/source/JSON.h @@ -12,8 +12,8 @@ #include "StdStringExtractor.h" // C includes -#include <inttypes.h> -#include <stdint.h> +#include <cinttypes> +#include <cstdint> // C++ includes #include <map> diff --git a/lldb/tools/debugserver/source/MacOSX/MachException.cpp b/lldb/tools/debugserver/source/MacOSX/MachException.cpp index 8690960..db154d1 100644 --- a/lldb/tools/debugserver/source/MacOSX/MachException.cpp +++ b/lldb/tools/debugserver/source/MacOSX/MachException.cpp @@ -17,7 +17,7 @@ #include "MachProcess.h" #include "PThreadMutex.h" #include "SysSignal.h" -#include <errno.h> +#include <cerrno> #include <sys/ptrace.h> #include <sys/types.h> diff --git a/lldb/tools/debugserver/source/MacOSX/MachThread.cpp b/lldb/tools/debugserver/source/MacOSX/MachThread.cpp index d2423a5..d34914b 100644 --- a/lldb/tools/debugserver/source/MacOSX/MachThread.cpp +++ b/lldb/tools/debugserver/source/MacOSX/MachThread.cpp @@ -15,8 +15,8 @@ #include "DNBLog.h" #include "MachProcess.h" #include "ThreadInfo.h" +#include <cinttypes> #include <dlfcn.h> -#include <inttypes.h> #include <mach/thread_policy.h> static uint32_t GetSequenceID() { diff --git a/lldb/tools/debugserver/source/MacOSX/MachThreadList.cpp b/lldb/tools/debugserver/source/MacOSX/MachThreadList.cpp index ce63b0f..71a33ad 100644 --- a/lldb/tools/debugserver/source/MacOSX/MachThreadList.cpp +++ b/lldb/tools/debugserver/source/MacOSX/MachThreadList.cpp @@ -17,7 +17,7 @@ #include "DNBThreadResumeActions.h" #include "MachProcess.h" -#include <inttypes.h> +#include <cinttypes> #include <sys/sysctl.h> #include <memory> diff --git a/lldb/tools/debugserver/source/MacOSX/MachVMRegion.cpp b/lldb/tools/debugserver/source/MacOSX/MachVMRegion.cpp index 6cb3429..ed2964c 100644 --- a/lldb/tools/debugserver/source/MacOSX/MachVMRegion.cpp +++ b/lldb/tools/debugserver/source/MacOSX/MachVMRegion.cpp @@ -12,7 +12,7 @@ #include "MachVMRegion.h" #include "DNBLog.h" -#include <assert.h> +#include <cassert> #include <mach/mach_vm.h> MachVMRegion::MachVMRegion(task_t task) diff --git a/lldb/tools/debugserver/source/MacOSX/arm/DNBArchImpl.cpp b/lldb/tools/debugserver/source/MacOSX/arm/DNBArchImpl.cpp index 6a6f2fd..0748223 100644 --- a/lldb/tools/debugserver/source/MacOSX/arm/DNBArchImpl.cpp +++ b/lldb/tools/debugserver/source/MacOSX/arm/DNBArchImpl.cpp @@ -22,7 +22,7 @@ #include "MacOSX/MachProcess.h" #include "MacOSX/MachThread.h" -#include <inttypes.h> +#include <cinttypes> #include <sys/sysctl.h> // BCR address match type diff --git a/lldb/tools/debugserver/source/MacOSX/arm64/DNBArchImplARM64.cpp b/lldb/tools/debugserver/source/MacOSX/arm64/DNBArchImplARM64.cpp index bed54f9..69a8333 100644 --- a/lldb/tools/debugserver/source/MacOSX/arm64/DNBArchImplARM64.cpp +++ b/lldb/tools/debugserver/source/MacOSX/arm64/DNBArchImplARM64.cpp @@ -23,7 +23,7 @@ #include "MacOSX/MachProcess.h" #include "MacOSX/MachThread.h" -#include <inttypes.h> +#include <cinttypes> #include <sys/sysctl.h> #if __has_feature(ptrauth_calls) diff --git a/lldb/tools/debugserver/source/MacOSX/i386/MachRegisterStatesI386.h b/lldb/tools/debugserver/source/MacOSX/i386/MachRegisterStatesI386.h index 8458a28..ba76925 100644 --- a/lldb/tools/debugserver/source/MacOSX/i386/MachRegisterStatesI386.h +++ b/lldb/tools/debugserver/source/MacOSX/i386/MachRegisterStatesI386.h @@ -13,7 +13,7 @@ #ifndef LLDB_TOOLS_DEBUGSERVER_SOURCE_MACOSX_I386_MACHREGISTERSTATESI386_H #define LLDB_TOOLS_DEBUGSERVER_SOURCE_MACOSX_I386_MACHREGISTERSTATESI386_H -#include <inttypes.h> +#include <cinttypes> #define __i386_THREAD_STATE 1 #define __i386_FLOAT_STATE 2 diff --git a/lldb/tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.cpp b/lldb/tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.cpp index a633ed2..7270ecb 100644 --- a/lldb/tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.cpp +++ b/lldb/tools/debugserver/source/MacOSX/x86_64/DNBArchImplX86_64.cpp @@ -20,8 +20,8 @@ #include "MacOSX/x86_64/DNBArchImplX86_64.h" #include "MachProcess.h" #include "MachThread.h" +#include <cstdlib> #include <mach/mach.h> -#include <stdlib.h> #if defined(LLDB_DEBUGSERVER_RELEASE) || defined(LLDB_DEBUGSERVER_DEBUG) enum debugState { debugStateUnknown, debugStateOff, debugStateOn }; diff --git a/lldb/tools/debugserver/source/MacOSX/x86_64/MachRegisterStatesX86_64.h b/lldb/tools/debugserver/source/MacOSX/x86_64/MachRegisterStatesX86_64.h index f53e0a7..b566accd 100644 --- a/lldb/tools/debugserver/source/MacOSX/x86_64/MachRegisterStatesX86_64.h +++ b/lldb/tools/debugserver/source/MacOSX/x86_64/MachRegisterStatesX86_64.h @@ -14,7 +14,7 @@ #ifndef LLDB_TOOLS_DEBUGSERVER_SOURCE_MACOSX_X86_64_MACHREGISTERSTATESX86_64_H #define LLDB_TOOLS_DEBUGSERVER_SOURCE_MACOSX_X86_64_MACHREGISTERSTATESX86_64_H -#include <inttypes.h> +#include <cinttypes> #define __x86_64_THREAD_STATE 4 #define __x86_64_FLOAT_STATE 5 diff --git a/lldb/tools/debugserver/source/PThreadEvent.cpp b/lldb/tools/debugserver/source/PThreadEvent.cpp index 82d1d22..e77c751 100644 --- a/lldb/tools/debugserver/source/PThreadEvent.cpp +++ b/lldb/tools/debugserver/source/PThreadEvent.cpp @@ -12,7 +12,7 @@ #include "PThreadEvent.h" #include "DNBLog.h" -#include "errno.h" +#include <cerrno> PThreadEvent::PThreadEvent(uint32_t bits, uint32_t validBits) : m_mutex(), m_set_condition(), m_reset_condition(), m_bits(bits), diff --git a/lldb/tools/debugserver/source/PThreadEvent.h b/lldb/tools/debugserver/source/PThreadEvent.h index da3d9d4..20faf82 100644 --- a/lldb/tools/debugserver/source/PThreadEvent.h +++ b/lldb/tools/debugserver/source/PThreadEvent.h @@ -14,8 +14,8 @@ #define LLDB_TOOLS_DEBUGSERVER_SOURCE_PTHREADEVENT_H #include "PThreadCondition.h" #include "PThreadMutex.h" -#include <stdint.h> -#include <time.h> +#include <cstdint> +#include <ctime> class PThreadEvent { public: diff --git a/lldb/tools/debugserver/source/PThreadMutex.h b/lldb/tools/debugserver/source/PThreadMutex.h index dce2e56..a4535dd 100644 --- a/lldb/tools/debugserver/source/PThreadMutex.h +++ b/lldb/tools/debugserver/source/PThreadMutex.h @@ -13,9 +13,9 @@ #ifndef LLDB_TOOLS_DEBUGSERVER_SOURCE_PTHREADMUTEX_H #define LLDB_TOOLS_DEBUGSERVER_SOURCE_PTHREADMUTEX_H -#include <assert.h> +#include <cassert> +#include <cstdint> #include <pthread.h> -#include <stdint.h> //#define DEBUG_PTHREAD_MUTEX_DEADLOCKS 1 diff --git a/lldb/tools/debugserver/source/PseudoTerminal.cpp b/lldb/tools/debugserver/source/PseudoTerminal.cpp index fb91d74..059b562 100644 --- a/lldb/tools/debugserver/source/PseudoTerminal.cpp +++ b/lldb/tools/debugserver/source/PseudoTerminal.cpp @@ -11,7 +11,7 @@ //===----------------------------------------------------------------------===// #include "PseudoTerminal.h" -#include <stdlib.h> +#include <cstdlib> #include <sys/ioctl.h> #include <unistd.h> diff --git a/lldb/tools/debugserver/source/RNBRemote.cpp b/lldb/tools/debugserver/source/RNBRemote.cpp index 876681a..9e89ab9 100644 --- a/lldb/tools/debugserver/source/RNBRemote.cpp +++ b/lldb/tools/debugserver/source/RNBRemote.cpp @@ -14,13 +14,13 @@ #include <bsm/audit.h> #include <bsm/audit_session.h> -#include <errno.h> +#include <cerrno> +#include <csignal> #include <libproc.h> #include <mach-o/loader.h> #include <mach/exception_types.h> #include <mach/task_info.h> #include <pwd.h> -#include <signal.h> #include <sys/stat.h> #include <sys/sysctl.h> #include <unistd.h> diff --git a/lldb/tools/debugserver/source/RNBSocket.cpp b/lldb/tools/debugserver/source/RNBSocket.cpp index 80b55b5d..f2c4880 100644 --- a/lldb/tools/debugserver/source/RNBSocket.cpp +++ b/lldb/tools/debugserver/source/RNBSocket.cpp @@ -14,7 +14,7 @@ #include "DNBError.h" #include "DNBLog.h" #include <arpa/inet.h> -#include <errno.h> +#include <cerrno> #include <fcntl.h> #include <map> #include <netdb.h> diff --git a/lldb/tools/debugserver/source/StdStringExtractor.cpp b/lldb/tools/debugserver/source/StdStringExtractor.cpp index a4cad2d..2035394 100644 --- a/lldb/tools/debugserver/source/StdStringExtractor.cpp +++ b/lldb/tools/debugserver/source/StdStringExtractor.cpp @@ -8,8 +8,7 @@ #include "StdStringExtractor.h" -#include <stdlib.h> - +#include <cstdlib> static inline int xdigit_to_sint(char ch) { if (ch >= 'a' && ch <= 'f') diff --git a/lldb/tools/debugserver/source/StdStringExtractor.h b/lldb/tools/debugserver/source/StdStringExtractor.h index 88544dc..c9ffeef 100644 --- a/lldb/tools/debugserver/source/StdStringExtractor.h +++ b/lldb/tools/debugserver/source/StdStringExtractor.h @@ -9,7 +9,7 @@ #ifndef LLDB_TOOLS_DEBUGSERVER_SOURCE_STDSTRINGEXTRACTOR_H #define LLDB_TOOLS_DEBUGSERVER_SOURCE_STDSTRINGEXTRACTOR_H -#include <stdint.h> +#include <cstdint> #include <string> diff --git a/lldb/tools/debugserver/source/SysSignal.cpp b/lldb/tools/debugserver/source/SysSignal.cpp index 9afbbec..da41cae 100644 --- a/lldb/tools/debugserver/source/SysSignal.cpp +++ b/lldb/tools/debugserver/source/SysSignal.cpp @@ -11,8 +11,8 @@ //===----------------------------------------------------------------------===// #include "SysSignal.h" -#include <signal.h> -#include <stddef.h> +#include <csignal> +#include <cstddef> const char *SysSignal::Name(int signal) { switch (signal) { diff --git a/lldb/tools/debugserver/source/TTYState.h b/lldb/tools/debugserver/source/TTYState.h index ac70417..8229a7c 100644 --- a/lldb/tools/debugserver/source/TTYState.h +++ b/lldb/tools/debugserver/source/TTYState.h @@ -13,7 +13,7 @@ #ifndef LLDB_TOOLS_DEBUGSERVER_SOURCE_TTYSTATE_H #define LLDB_TOOLS_DEBUGSERVER_SOURCE_TTYSTATE_H -#include <stdint.h> +#include <cstdint> #include <termios.h> class TTYState { diff --git a/lldb/tools/debugserver/source/debugserver.cpp b/lldb/tools/debugserver/source/debugserver.cpp index a0a3047..853dcd5 100644 --- a/lldb/tools/debugserver/source/debugserver.cpp +++ b/lldb/tools/debugserver/source/debugserver.cpp @@ -8,8 +8,8 @@ #include <arpa/inet.h> #include <asl.h> +#include <cerrno> #include <crt_externs.h> -#include <errno.h> #include <getopt.h> #include <netdb.h> #include <netinet/in.h> diff --git a/lldb/tools/debugserver/source/libdebugserver.cpp b/lldb/tools/debugserver/source/libdebugserver.cpp index 0c53fa4..6da3708 100644 --- a/lldb/tools/debugserver/source/libdebugserver.cpp +++ b/lldb/tools/debugserver/source/libdebugserver.cpp @@ -6,7 +6,7 @@ // //===----------------------------------------------------------------------===// -#include <errno.h> +#include <cerrno> #include <getopt.h> #include <netinet/in.h> #include <sys/select.h> diff --git a/lldb/tools/driver/Driver.cpp b/lldb/tools/driver/Driver.cpp index b91e930..bfd1347 100644 --- a/lldb/tools/driver/Driver.cpp +++ b/lldb/tools/driver/Driver.cpp @@ -36,11 +36,11 @@ #include <thread> #include <utility> +#include <climits> +#include <cstdio> +#include <cstdlib> +#include <cstring> #include <fcntl.h> -#include <limits.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> // Includes for pipe() #if defined(_WIN32) diff --git a/lldb/tools/driver/Platform.cpp b/lldb/tools/driver/Platform.cpp index f3a71eb..0891cfa 100644 --- a/lldb/tools/driver/Platform.cpp +++ b/lldb/tools/driver/Platform.cpp @@ -9,9 +9,9 @@ // this file is only relevant for Visual C++ #if defined(_WIN32) -#include <assert.h> +#include <cassert> +#include <cstdlib> #include <process.h> -#include <stdlib.h> #include "Platform.h" #include "llvm/Support/ErrorHandling.h" diff --git a/lldb/tools/driver/Platform.h b/lldb/tools/driver/Platform.h index 6b893f9..d7573b7 100644 --- a/lldb/tools/driver/Platform.h +++ b/lldb/tools/driver/Platform.h @@ -15,13 +15,13 @@ #include <io.h> #if defined(_MSC_VER) -#include <signal.h> +#include <csignal> #endif #if HAVE_SYS_TYPES_H #include <sys/types.h> #endif #include "lldb/Host/windows/windows.h" -#include <inttypes.h> +#include <cinttypes> struct winsize { long ws_col; @@ -76,7 +76,7 @@ extern int tcsetattr(int fd, int optional_actions, extern int tcgetattr(int fildes, struct termios *termios_p); #else -#include <inttypes.h> +#include <cinttypes> #include <libgen.h> #include <sys/ioctl.h> diff --git a/lldb/tools/lldb-server/lldb-gdbserver.cpp b/lldb/tools/lldb-server/lldb-gdbserver.cpp index a9db73f..f014646 100644 --- a/lldb/tools/lldb-server/lldb-gdbserver.cpp +++ b/lldb/tools/lldb-server/lldb-gdbserver.cpp @@ -6,14 +6,14 @@ // //===----------------------------------------------------------------------===// -#include <errno.h> -#include <stdint.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> +#include <cerrno> +#include <cstdint> +#include <cstdio> +#include <cstdlib> +#include <cstring> #ifndef _WIN32 -#include <signal.h> +#include <csignal> #include <unistd.h> #endif diff --git a/lldb/tools/lldb-server/lldb-platform.cpp b/lldb/tools/lldb-server/lldb-platform.cpp index 131387c..d4b5436 100644 --- a/lldb/tools/lldb-server/lldb-platform.cpp +++ b/lldb/tools/lldb-server/lldb-platform.cpp @@ -6,15 +6,15 @@ // //===----------------------------------------------------------------------===// -#include <errno.h> +#include <cerrno> #if defined(__APPLE__) #include <netinet/in.h> #endif -#include <signal.h> -#include <stdint.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> +#include <csignal> +#include <cstdint> +#include <cstdio> +#include <cstdlib> +#include <cstring> #if !defined(_WIN32) #include <sys/wait.h> #endif diff --git a/lldb/tools/lldb-server/lldb-server.cpp b/lldb/tools/lldb-server/lldb-server.cpp index acf6780..1e001ac 100644 --- a/lldb/tools/lldb-server/lldb-server.cpp +++ b/lldb/tools/lldb-server/lldb-server.cpp @@ -17,8 +17,8 @@ #include "llvm/Support/PrettyStackTrace.h" #include "llvm/Support/Signals.h" -#include <stdio.h> -#include <stdlib.h> +#include <cstdio> +#include <cstdlib> static llvm::ManagedStatic<lldb_private::SystemLifetimeManager> g_debugger_lifetime; diff --git a/lldb/tools/lldb-vscode/JSONUtils.h b/lldb/tools/lldb-vscode/JSONUtils.h index 21d0b32..bb81b88 100644 --- a/lldb/tools/lldb-vscode/JSONUtils.h +++ b/lldb/tools/lldb-vscode/JSONUtils.h @@ -13,7 +13,7 @@ #include "lldb/API/SBModule.h" #include "llvm/ADT/StringRef.h" #include "llvm/Support/JSON.h" -#include <stdint.h> +#include <cstdint> namespace lldb_vscode { diff --git a/lldb/tools/lldb-vscode/VSCode.cpp b/lldb/tools/lldb-vscode/VSCode.cpp index 875be9a..7e1154b 100644 --- a/lldb/tools/lldb-vscode/VSCode.cpp +++ b/lldb/tools/lldb-vscode/VSCode.cpp @@ -7,10 +7,10 @@ //===----------------------------------------------------------------------===// #include <chrono> +#include <cstdarg> #include <fstream> #include <mutex> #include <sstream> -#include <stdarg.h> #include "LLDBUtils.h" #include "VSCode.h" diff --git a/lldb/tools/lldb-vscode/VSCode.h b/lldb/tools/lldb-vscode/VSCode.h index 45250b9..1ae2d97 100644 --- a/lldb/tools/lldb-vscode/VSCode.h +++ b/lldb/tools/lldb-vscode/VSCode.h @@ -12,10 +12,10 @@ #include "llvm/Config/llvm-config.h" // for LLVM_ON_UNIX #include <condition_variable> +#include <cstdio> #include <iosfwd> #include <map> #include <set> -#include <stdio.h> #include <thread> #include "llvm/ADT/DenseMap.h" diff --git a/lldb/tools/lldb-vscode/lldb-vscode.cpp b/lldb/tools/lldb-vscode/lldb-vscode.cpp index 823a8eb..29b4019 100644 --- a/lldb/tools/lldb-vscode/lldb-vscode.cpp +++ b/lldb/tools/lldb-vscode/lldb-vscode.cpp @@ -8,12 +8,12 @@ #include "VSCode.h" -#include <assert.h> -#include <limits.h> -#include <stdarg.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> +#include <cassert> +#include <climits> +#include <cstdarg> +#include <cstdio> +#include <cstdlib> +#include <cstring> #include <sys/stat.h> #include <sys/types.h> #if defined(_WIN32) |