From 891d56baecbb36f01e2a54ce951da9d2473f212c Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Wed, 9 Jun 2010 07:14:21 +0000 Subject: [PATCH] More random error/warning fixes. llvm-svn: 105695 --- lldb/include/lldb/Core/FileSpec.h | 12 ++++++------ lldb/include/lldb/Core/STLUtils.h | 4 ++-- lldb/include/lldb/Core/Stream.h | 3 ++- lldb/include/lldb/Symbol/Block.h | 2 +- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/lldb/include/lldb/Core/FileSpec.h b/lldb/include/lldb/Core/FileSpec.h index 4aa17826c2b2..af691e59ad29 100644 --- a/lldb/include/lldb/Core/FileSpec.h +++ b/lldb/include/lldb/Core/FileSpec.h @@ -37,8 +37,8 @@ public: eFileTypePipe, eFileTypeRegular, eFileTypeSocket, - eFileTypeSymbolicLink, - }; + eFileTypeSymbolicLink + } FileType; FileSpec(); @@ -351,7 +351,7 @@ public: /// /// @param[in] length /// The size in bytes that should be mapped starting \a offset - /// bytes into the file. If \a length is \c SIZE_T_MAX, map + /// bytes into the file. If \a length is \c SIZE_MAX, map /// as many bytes as possible. /// /// @return @@ -360,7 +360,7 @@ public: /// pointer must be checked prior to using it. //------------------------------------------------------------------ lldb::DataBufferSP - MemoryMapFileContents (off_t offset = 0, size_t length = SIZE_T_MAX) const; + MemoryMapFileContents (off_t offset = 0, size_t length = SIZE_MAX) const; //------------------------------------------------------------------ /// Read part of, or the entire contents of, a file into a heap based data buffer. @@ -381,7 +381,7 @@ public: /// /// @param[in] length /// The size in bytes that should be mapped starting \a offset - /// bytes into the file. If \a length is \c SIZE_T_MAX, map + /// bytes into the file. If \a length is \c SIZE_MAX, map /// as many bytes as possible. /// /// @return @@ -390,7 +390,7 @@ public: /// pointer must be checked prior to using it. //------------------------------------------------------------------ lldb::DataBufferSP - ReadFileContents (off_t offset = 0, size_t length = SIZE_T_MAX) const; + ReadFileContents (off_t offset = 0, size_t length = SIZE_MAX) const; //------------------------------------------------------------------ /// Change the file specificed with a new path. diff --git a/lldb/include/lldb/Core/STLUtils.h b/lldb/include/lldb/Core/STLUtils.h index 21b9a0af6c5b..342d5b4b57c5 100644 --- a/lldb/include/lldb/Core/STLUtils.h +++ b/lldb/include/lldb/Core/STLUtils.h @@ -11,7 +11,7 @@ #define liblldb_STLUtils_h_ #if defined(__cplusplus) -#include +#include "llvm/ADT/StringExtras.h" #include #include @@ -66,7 +66,7 @@ struct StdStringHash { size_t operator()( const std::string& x ) const { - return __gnu_cxx::hash()( x.c_str() ); + return llvm::HashString(x); } }; diff --git a/lldb/include/lldb/Core/Stream.h b/lldb/include/lldb/Core/Stream.h index 250bd1f2afd8..b4523d5d6173 100644 --- a/lldb/include/lldb/Core/Stream.h +++ b/lldb/include/lldb/Core/Stream.h @@ -13,6 +13,7 @@ #include "lldb/lldb-private.h" #include "lldb/Core/Flags.h" +#include namespace lldb_private { @@ -31,7 +32,7 @@ public: eVerbose = (1 << 0), ///< If set, verbose logging is enabled eDebug = (1 << 1), ///< If set, debug logging is enabled eAddPrefix = (1 << 2), ///< Add number prefixes for binary, octal and hex when eBinary is clear - eBinary = (1 << 3), ///< Get and put data as binary instead of as the default string mode. + eBinary = (1 << 3) ///< Get and put data as binary instead of as the default string mode. }; //------------------------------------------------------------------ diff --git a/lldb/include/lldb/Symbol/Block.h b/lldb/include/lldb/Symbol/Block.h index 1e2b23aa2f71..85c981c7355b 100644 --- a/lldb/include/lldb/Symbol/Block.h +++ b/lldb/include/lldb/Symbol/Block.h @@ -49,7 +49,7 @@ public: /// Enumeration values for special and invalid Block User ID /// values. //------------------------------------------------------------------ - typedef enum + enum { RootID = LLDB_INVALID_UID - 1, ///< The Block UID for the root block InvalidID = LLDB_INVALID_UID ///< Invalid Block UID.