Skip to content

Commit

Permalink
[lldb][NFC] Use C++ versions of the deprecated C standard library hea…
Browse files Browse the repository at this point in the history
…ders

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
  • Loading branch information
Teemperor committed May 26, 2021
1 parent 21aec4f commit 76e47d4
Show file tree
Hide file tree
Showing 330 changed files with 558 additions and 562 deletions.
2 changes: 1 addition & 1 deletion lldb/include/lldb/API/SBCommandReturnObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#ifndef LLDB_API_SBCOMMANDRETURNOBJECT_H
#define LLDB_API_SBCOMMANDRETURNOBJECT_H

#include <stdio.h>
#include <cstdio>

#include <memory>

Expand Down
2 changes: 1 addition & 1 deletion lldb/include/lldb/API/SBDebugger.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion lldb/include/lldb/API/SBEvent.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

#include "lldb/API/SBDefines.h"

#include <stdio.h>
#include <cstdio>
#include <vector>

namespace lldb {
Expand Down
2 changes: 1 addition & 1 deletion lldb/include/lldb/API/SBExecutionContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

#include "lldb/API/SBDefines.h"

#include <stdio.h>
#include <cstdio>
#include <vector>

namespace lldb {
Expand Down
2 changes: 1 addition & 1 deletion lldb/include/lldb/API/SBInstruction.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion lldb/include/lldb/API/SBInstructionList.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

#include "lldb/API/SBDefines.h"

#include <stdio.h>
#include <cstdio>

namespace lldb {

Expand Down
2 changes: 1 addition & 1 deletion lldb/include/lldb/API/SBProcess.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down
2 changes: 1 addition & 1 deletion lldb/include/lldb/API/SBSourceManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

#include "lldb/API/SBDefines.h"

#include <stdio.h>
#include <cstdio>

namespace lldb {

Expand Down
2 changes: 1 addition & 1 deletion lldb/include/lldb/API/SBStream.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#ifndef LLDB_API_SBSTREAM_H
#define LLDB_API_SBSTREAM_H

#include <stdio.h>
#include <cstdio>

#include "lldb/API/SBDefines.h"

Expand Down
2 changes: 1 addition & 1 deletion lldb/include/lldb/API/SBThread.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

#include "lldb/API/SBDefines.h"

#include <stdio.h>
#include <cstdio>

namespace lldb {

Expand Down
2 changes: 1 addition & 1 deletion lldb/include/lldb/API/SBThreadPlan.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

#include "lldb/API/SBDefines.h"

#include <stdio.h>
#include <cstdio>

namespace lldb {

Expand Down
2 changes: 1 addition & 1 deletion lldb/include/lldb/Breakpoint/StoppointHitCounter.h
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down
4 changes: 2 additions & 2 deletions lldb/include/lldb/Core/Address.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion lldb/include/lldb/Core/AddressRange.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include "lldb/lldb-forward.h"
#include "lldb/lldb-types.h"

#include <stddef.h>
#include <cstddef>

namespace lldb_private {
class SectionList;
Expand Down
2 changes: 1 addition & 1 deletion lldb/include/lldb/Core/AddressResolver.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include "lldb/Core/SearchFilter.h"
#include "lldb/lldb-defines.h"

#include <stddef.h>
#include <cstddef>
#include <vector>

namespace lldb_private {
Expand Down
2 changes: 1 addition & 1 deletion lldb/include/lldb/Core/AddressResolverFileLine.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include "lldb/Core/SourceLocationSpec.h"
#include "lldb/lldb-defines.h"

#include <stdint.h>
#include <cstdint>

namespace lldb_private {
class Address;
Expand Down
4 changes: 2 additions & 2 deletions lldb/include/lldb/Core/Communication.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
#include <ratio>
#include <string>

#include <stddef.h>
#include <stdint.h>
#include <cstddef>
#include <cstdint>

namespace lldb_private {
class Connection;
Expand Down
8 changes: 4 additions & 4 deletions lldb/include/lldb/Core/Debugger.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#ifndef LLDB_CORE_DEBUGGER_H
#define LLDB_CORE_DEBUGGER_H

#include <stdint.h>
#include <cstdint>

#include <memory>
#include <vector>
Expand Down Expand Up @@ -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;
Expand Down
6 changes: 3 additions & 3 deletions lldb/include/lldb/Core/Disassembler.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions lldb/include/lldb/Core/DumpDataExtractor.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions lldb/include/lldb/Core/EmulateInstruction.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion lldb/include/lldb/Core/FileLineResolver.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include "lldb/Utility/FileSpec.h"
#include "lldb/lldb-defines.h"

#include <stdint.h>
#include <cstdint>

namespace lldb_private {
class Address;
Expand Down
2 changes: 1 addition & 1 deletion lldb/include/lldb/Core/FileSpecList.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

#include <vector>

#include <stddef.h>
#include <cstddef>

namespace lldb_private {
class Stream;
Expand Down
4 changes: 2 additions & 2 deletions lldb/include/lldb/Core/FormatEntity.h
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
4 changes: 2 additions & 2 deletions lldb/include/lldb/Core/IOHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
#include <string>
#include <vector>

#include <stdint.h>
#include <stdio.h>
#include <cstdint>
#include <cstdio>

namespace lldb_private {
class Debugger;
Expand Down
2 changes: 1 addition & 1 deletion lldb/include/lldb/Core/Mangled.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@

#include "llvm/ADT/StringRef.h"

#include <cstddef>
#include <memory>
#include <stddef.h>

namespace lldb_private {

Expand Down
4 changes: 2 additions & 2 deletions lldb/include/lldb/Core/MappedHash.h
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
4 changes: 2 additions & 2 deletions lldb/include/lldb/Core/Module.h
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down
4 changes: 2 additions & 2 deletions lldb/include/lldb/Core/ModuleList.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
#include <mutex>
#include <vector>

#include <stddef.h>
#include <stdint.h>
#include <cstddef>
#include <cstdint>

namespace lldb_private {
class ConstString;
Expand Down
6 changes: 3 additions & 3 deletions lldb/include/lldb/Core/Opcode.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions lldb/include/lldb/Core/PluginManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 { \
Expand Down
2 changes: 1 addition & 1 deletion lldb/include/lldb/Core/SearchFilter.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include "lldb/Utility/FileSpec.h"
#include "lldb/lldb-forward.h"

#include <stdint.h>
#include <cstdint>

namespace lldb_private {
class Address;
Expand Down
4 changes: 2 additions & 2 deletions lldb/include/lldb/Core/Section.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
#include <memory>
#include <vector>

#include <stddef.h>
#include <stdint.h>
#include <cstddef>
#include <cstdint>

namespace lldb_private {
class Address;
Expand Down
2 changes: 1 addition & 1 deletion lldb/include/lldb/Core/SourceManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@

#include "llvm/Support/Chrono.h"

#include <cstddef>
#include <cstdint>
#include <map>
#include <memory>
#include <stddef.h>
#include <string>
#include <vector>

Expand Down
2 changes: 1 addition & 1 deletion lldb/include/lldb/Core/StreamAsynchronousIO.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

#include <string>

#include <stddef.h>
#include <cstddef>

namespace lldb_private {
class Debugger;
Expand Down
2 changes: 1 addition & 1 deletion lldb/include/lldb/Core/StreamBuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

#include "lldb/Utility/Stream.h"
#include "llvm/ADT/SmallVector.h"
#include <stdio.h>
#include <cstdio>
#include <string>

namespace lldb_private {
Expand Down
4 changes: 2 additions & 2 deletions lldb/include/lldb/Core/StreamFile.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down
4 changes: 2 additions & 2 deletions lldb/include/lldb/Core/UserSettingsController.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@

#include <vector>

#include <stddef.h>
#include <stdint.h>
#include <cstddef>
#include <cstdint>

namespace lldb_private {
class CommandInterpreter;
Expand Down
Loading

0 comments on commit 76e47d4

Please sign in to comment.