Here's a patch to fix a pile of warnings using ToT clang to build
lldb. Mostly the deprecation of "register", but a couple of others
around floating point constants etc.

The one build fix is in IOChannel and seems that for, at least my
ubuntu machine, we need to use the same readline that FreeBSD does.

Thoughts/Objections? OK?

-eric
Index: source/Plugins/SymbolFile/DWARF/DWARFAttribute.h
===================================================================
--- source/Plugins/SymbolFile/DWARF/DWARFAttribute.h    (revision 189631)
+++ source/Plugins/SymbolFile/DWARF/DWARFAttribute.h    (working copy)
@@ -28,7 +28,7 @@
     dw_form_t   get_form() const { return (dw_form_t)m_attr_form; }
     void        get(dw_attr_t& attr, dw_form_t& form)  const
     {
-        register uint32_t attr_form = m_attr_form;
+        uint32_t attr_form = m_attr_form;
         attr = attr_form >> 16;
         form = (dw_form_t)attr_form;
     }
Index: source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
===================================================================
--- source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp     (revision 
189631)
+++ source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp     (working copy)
@@ -151,8 +151,8 @@
         m_has_children = abbrevDecl->HasChildren();
         // Skip all data in the .debug_info for the attributes
         const uint32_t numAttributes = abbrevDecl->NumAttributes();
-        register uint32_t i;
-        register dw_form_t form;
+        uint32_t i;
+        dw_form_t form;
         for (i=0; i<numAttributes; ++i)
         {
             form = abbrevDecl->GetFormByIndexUnchecked(i);
@@ -166,7 +166,7 @@
                 do
                 {
                     form_is_indirect = false;
-                    register uint32_t form_size = 0;
+                    uint32_t form_size = 0;
                     switch (form)
                     {
                     // Blocks if inlined data that have a length field and the 
data bytes
@@ -332,7 +332,7 @@
                         do
                         {
                             form_is_indirect = false;
-                            register uint32_t form_size = 0;
+                            uint32_t form_size = 0;
                             switch (form)
                             {
                             // Blocks if inlined data that have a length field 
and the data bytes
Index: source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
===================================================================
--- source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp  
(revision 189631)
+++ source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp  
(working copy)
@@ -55,7 +55,6 @@
     m_supports_vCont_C (eLazyBoolCalculate),
     m_supports_vCont_s (eLazyBoolCalculate),
     m_supports_vCont_S (eLazyBoolCalculate),
-    m_supports_p (eLazyBoolCalculate),
     m_qHostInfo_is_valid (eLazyBoolCalculate),
     m_qProcessInfo_is_valid (eLazyBoolCalculate),
     m_supports_alloc_dealloc_memory (eLazyBoolCalculate),
@@ -65,6 +64,7 @@
     m_watchpoints_trigger_after_instruction(eLazyBoolCalculate),
     m_attach_or_wait_reply(eLazyBoolCalculate),
     m_prepare_for_reg_writing_reply (eLazyBoolCalculate),
+    m_supports_p (eLazyBoolCalculate),
     m_supports_qProcessInfoPID (true),
     m_supports_qfProcessInfo (true),
     m_supports_qUserName (true),
Index: source/Core/DataExtractor.cpp
===================================================================
--- source/Core/DataExtractor.cpp       (revision 189631)
+++ source/Core/DataExtractor.cpp       (working copy)
@@ -1336,12 +1336,12 @@
     if( 0 == (v & 0x7c00))
     {
         u.u = v & 0x80007FFFU;
-        return u.f * 0x1.0p125f;
+        return u.f * ldexpf(1, 125);
     }
     
     v <<= 13;
     u.u = v | 0x70000000U;
-    return u.f * 0x1.0p-112f;
+    return u.f * ldexpf(1, -112);
 }
 
 lldb::offset_t
Index: source/Core/ConstString.cpp
===================================================================
--- source/Core/ConstString.cpp (revision 189631)
+++ source/Core/ConstString.cpp (working copy)
@@ -259,8 +259,8 @@
 ConstString::Compare (const ConstString& lhs, const ConstString& rhs)
 {
     // If the iterators are the same, this is the same string
-    register const char *lhs_cstr = lhs.m_string;
-    register const char *rhs_cstr = rhs.m_string;
+    const char *lhs_cstr = lhs.m_string;
+    const char *rhs_cstr = rhs.m_string;
     if (lhs_cstr == rhs_cstr)
         return 0;
     if (lhs_cstr && rhs_cstr)
Index: source/Core/SourceManager.cpp
===================================================================
--- source/Core/SourceManager.cpp       (revision 189631)
+++ source/Core/SourceManager.cpp       (working copy)
@@ -567,15 +567,15 @@
 
                 // Push a 1 at index zero to indicate the file has been 
completely indexed.
                 m_offsets.push_back(UINT32_MAX);
-                register const char *s;
+                const char *s;
                 for (s = start; s < end; ++s)
                 {
-                    register char curr_ch = *s;
+                    char curr_ch = *s;
                     if (is_newline_char (curr_ch))
                     {
                         if (s + 1 < end)
                         {
-                            register char next_ch = s[1];
+                            char next_ch = s[1];
                             if (is_newline_char (next_ch))
                             {
                                 if (curr_ch != next_ch)
Index: source/Commands/CommandObjectPlatform.cpp
===================================================================
--- source/Commands/CommandObjectPlatform.cpp   (revision 189631)
+++ source/Commands/CommandObjectPlatform.cpp   (working copy)
@@ -2190,7 +2190,6 @@
         case FileSpec::eFileTypeInvalid:
         case FileSpec::eFileTypeOther:
         case FileSpec::eFileTypeUnknown:
-        default:
             rc_baton->error.SetErrorStringWithFormat("invalid file detected 
during copy: %s/%s", spec.GetDirectory().GetCString(), 
spec.GetFilename().GetCString());
             return FileSpec::eEnumerateDirectoryResultQuit; // got an error, 
bail out
             break;
Index: tools/driver/IOChannel.h
===================================================================
--- tools/driver/IOChannel.h    (revision 189631)
+++ tools/driver/IOChannel.h    (working copy)
@@ -13,7 +13,7 @@
 #include <string>
 #include <queue>
 
-#if defined(__FreeBSD__)
+#if defined(__FreeBSD__) || defined(__linux__)
 #include <readline/readline.h>
 #else
 #include <editline/readline.h>
_______________________________________________
lldb-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits

Reply via email to