mirror of
https://github.com/intel/llvm.git
synced 2026-01-23 16:06:39 +08:00
[lldb][NFCI] Remove use of ifdef __cpluplus where unneeded
Just about every file in the lldb project is built with C++ enabled. Unless I've missed something, these macro guards don't really accomplish very much. Differential Revision: https://reviews.llvm.org/D157538
This commit is contained in:
@@ -8,7 +8,6 @@
|
||||
|
||||
#ifndef LLDB_CORE_MANGLED_H
|
||||
#define LLDB_CORE_MANGLED_H
|
||||
#if defined(__cplusplus)
|
||||
|
||||
#include "lldb/lldb-enumerations.h"
|
||||
#include "lldb/lldb-forward.h"
|
||||
@@ -286,5 +285,4 @@ Stream &operator<<(Stream &s, const Mangled &obj);
|
||||
|
||||
} // namespace lldb_private
|
||||
|
||||
#endif // #if defined(__cplusplus)
|
||||
#endif // LLDB_CORE_MANGLED_H
|
||||
|
||||
@@ -27,7 +27,6 @@
|
||||
|
||||
#ifndef LLDB_HOST_EDITLINE_H
|
||||
#define LLDB_HOST_EDITLINE_H
|
||||
#if defined(__cplusplus)
|
||||
|
||||
#include "lldb/Host/Config.h"
|
||||
|
||||
@@ -408,5 +407,4 @@ private:
|
||||
};
|
||||
}
|
||||
|
||||
#endif // #if defined(__cplusplus)
|
||||
#endif // LLDB_HOST_EDITLINE_H
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
|
||||
#ifndef LLDB_HOST_TERMINAL_H
|
||||
#define LLDB_HOST_TERMINAL_H
|
||||
#if defined(__cplusplus)
|
||||
|
||||
#include "lldb/lldb-private.h"
|
||||
#include "llvm/Support/Error.h"
|
||||
@@ -172,5 +171,4 @@ protected:
|
||||
|
||||
} // namespace lldb_private
|
||||
|
||||
#endif // #if defined(__cplusplus)
|
||||
#endif // LLDB_HOST_TERMINAL_H
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
|
||||
#ifndef LLDB_HOST_POSIX_PIPEPOSIX_H
|
||||
#define LLDB_HOST_POSIX_PIPEPOSIX_H
|
||||
#if defined(__cplusplus)
|
||||
|
||||
#include "lldb/Host/PipeBase.h"
|
||||
|
||||
@@ -76,5 +75,4 @@ private:
|
||||
|
||||
} // namespace lldb_private
|
||||
|
||||
#endif // #if defined(__cplusplus)
|
||||
#endif // LLDB_HOST_POSIX_PIPEPOSIX_H
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
|
||||
#ifndef LLDB_UTILITY_DATABUFFER_H
|
||||
#define LLDB_UTILITY_DATABUFFER_H
|
||||
#if defined(__cplusplus)
|
||||
|
||||
#include <cstdint>
|
||||
#include <cstring>
|
||||
@@ -149,5 +148,4 @@ private:
|
||||
|
||||
} // namespace lldb_private
|
||||
|
||||
#endif /// #if defined(__cplusplus)
|
||||
#endif // LLDB_UTILITY_DATABUFFER_H
|
||||
|
||||
@@ -9,8 +9,6 @@
|
||||
#ifndef LLDB_UTILITY_DATAENCODER_H
|
||||
#define LLDB_UTILITY_DATAENCODER_H
|
||||
|
||||
#if defined(__cplusplus)
|
||||
|
||||
#include "lldb/lldb-defines.h"
|
||||
#include "lldb/lldb-enumerations.h"
|
||||
#include "lldb/lldb-forward.h"
|
||||
@@ -301,5 +299,4 @@ private:
|
||||
|
||||
} // namespace lldb_private
|
||||
|
||||
#endif // #if defined (__cplusplus)
|
||||
#endif // LLDB_UTILITY_DATAENCODER_H
|
||||
|
||||
@@ -9,8 +9,6 @@
|
||||
#ifndef LLDB_LLDB_FORWARD_H
|
||||
#define LLDB_LLDB_FORWARD_H
|
||||
|
||||
#if defined(__cplusplus)
|
||||
|
||||
#include <memory>
|
||||
|
||||
// lldb forward declarations
|
||||
@@ -465,5 +463,4 @@ typedef std::shared_ptr<lldb_private::Watchpoint> WatchpointSP;
|
||||
|
||||
} // namespace lldb
|
||||
|
||||
#endif // #if defined(__cplusplus)
|
||||
#endif // LLDB_LLDB_FORWARD_H
|
||||
|
||||
@@ -9,8 +9,6 @@
|
||||
#ifndef LLDB_LLDB_PRIVATE_INTERFACES_H
|
||||
#define LLDB_LLDB_PRIVATE_INTERFACES_H
|
||||
|
||||
#if defined(__cplusplus)
|
||||
|
||||
#include "lldb/lldb-enumerations.h"
|
||||
#include "lldb/lldb-forward.h"
|
||||
#include "lldb/lldb-private-enumerations.h"
|
||||
@@ -131,6 +129,4 @@ typedef lldb::CommandObjectSP (*ThreadTraceExportCommandCreator)(
|
||||
/// \}
|
||||
} // namespace lldb_private
|
||||
|
||||
#endif // #if defined(__cplusplus)
|
||||
|
||||
#endif // LLDB_LLDB_PRIVATE_INTERFACES_H
|
||||
|
||||
@@ -9,8 +9,6 @@
|
||||
#ifndef LLDB_LLDB_PRIVATE_TYPES_H
|
||||
#define LLDB_LLDB_PRIVATE_TYPES_H
|
||||
|
||||
#if defined(__cplusplus)
|
||||
|
||||
#include "lldb/lldb-private.h"
|
||||
|
||||
#include "llvm/ADT/ArrayRef.h"
|
||||
@@ -125,6 +123,4 @@ typedef bool (*CommandOverrideCallbackWithResult)(
|
||||
void *baton, const char **argv, lldb_private::CommandReturnObject &result);
|
||||
} // namespace lldb_private
|
||||
|
||||
#endif // #if defined(__cplusplus)
|
||||
|
||||
#endif // LLDB_LLDB_PRIVATE_TYPES_H
|
||||
|
||||
@@ -9,13 +9,9 @@
|
||||
#ifndef LLDB_LLDB_PRIVATE_H
|
||||
#define LLDB_LLDB_PRIVATE_H
|
||||
|
||||
#if defined(__cplusplus)
|
||||
|
||||
#include "lldb/lldb-private-enumerations.h"
|
||||
#include "lldb/lldb-private-interfaces.h"
|
||||
#include "lldb/lldb-private-types.h"
|
||||
#include "lldb/lldb-public.h"
|
||||
|
||||
#endif // defined(__cplusplus)
|
||||
|
||||
#endif // LLDB_LLDB_PRIVATE_H
|
||||
|
||||
@@ -11,8 +11,6 @@
|
||||
|
||||
#include <CoreFoundation/CoreFoundation.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
#include <cassert>
|
||||
|
||||
// Templatized CF helper class that can own any CF pointer and will
|
||||
@@ -105,5 +103,4 @@ private:
|
||||
T _ptr;
|
||||
};
|
||||
|
||||
#endif // #ifdef __cplusplus
|
||||
#endif // LLDB_SOURCE_HOST_MACOSX_CFCPP_CFCRELEASER_H
|
||||
|
||||
@@ -31,9 +31,7 @@ static inline int setup_posix_spawn_responsible_flag(posix_spawnattr_t *attr) {
|
||||
static dispatch_once_t pred;
|
||||
dispatch_once(&pred, ^{
|
||||
responsibility_spawnattrs_setdisclaim_ptr =
|
||||
#ifdef __cplusplus
|
||||
reinterpret_cast<__typeof__(&responsibility_spawnattrs_setdisclaim)>
|
||||
#endif
|
||||
(dlsym(RTLD_DEFAULT, "responsibility_spawnattrs_setdisclaim"));
|
||||
});
|
||||
if (responsibility_spawnattrs_setdisclaim_ptr)
|
||||
|
||||
@@ -17,9 +17,7 @@
|
||||
#include <cstdint>
|
||||
#include <cstdio>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
// Flags that get filled in automatically before calling the log callback
|
||||
// function
|
||||
@@ -144,9 +142,6 @@ void DNBLogSetVerbose(int g);
|
||||
#define DNBLogCloseLogFile() ((void)0)
|
||||
|
||||
#endif // #else defined(DNBLOG_ENABLED)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // LLDB_TOOLS_DEBUGSERVER_SOURCE_DNBLOG_H
|
||||
|
||||
@@ -18,12 +18,10 @@
|
||||
#include <cstdio>
|
||||
|
||||
struct DNBRegisterValueClass : public DNBRegisterValue {
|
||||
#ifdef __cplusplus
|
||||
DNBRegisterValueClass(const DNBRegisterInfo *regInfo = NULL);
|
||||
void Clear();
|
||||
void Dump(const char *pre, const char *post) const;
|
||||
bool IsValid() const;
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -15,8 +15,6 @@
|
||||
|
||||
#include <CoreFoundation/CoreFoundation.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
// Templatized CF helper class that can own any CF pointer and will
|
||||
// call CFRelease() on any valid pointer it owns unless that pointer is
|
||||
// explicitly released using the release() member function.
|
||||
@@ -71,5 +69,4 @@ private:
|
||||
element_type _ptr;
|
||||
};
|
||||
|
||||
#endif // #ifdef __cplusplus
|
||||
#endif // LLDB_TOOLS_DEBUGSERVER_SOURCE_MACOSX_CFUTILS_H
|
||||
|
||||
Reference in New Issue
Block a user