[Lldb-commits] [lldb] r161719 - in /lldb/trunk: include/lldb/Target/ExecutionContext.h source/API/SBBreakpoint.cpp source/API/SBWatchpoint.cpp source/Expression/ClangExpressionDeclMap.cpp source/Expression/IRInterpreter.cpp source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp source/Target/LanguageRuntime.cpp source/Target/Thread.cpp

Jim Ingham jingham at apple.com
Fri Aug 10 17:35:27 PDT 2012


Author: jingham
Date: Fri Aug 10 19:35:26 2012
New Revision: 161719

URL: http://llvm.org/viewvc/llvm-project?rev=161719&view=rev
Log:
Add explicit casts to bool in "shared pointer is valid" constructs that return bool.

Modified:
    lldb/trunk/include/lldb/Target/ExecutionContext.h
    lldb/trunk/source/API/SBBreakpoint.cpp
    lldb/trunk/source/API/SBWatchpoint.cpp
    lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp
    lldb/trunk/source/Expression/IRInterpreter.cpp
    lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
    lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
    lldb/trunk/source/Target/LanguageRuntime.cpp
    lldb/trunk/source/Target/Thread.cpp

Modified: lldb/trunk/include/lldb/Target/ExecutionContext.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/ExecutionContext.h?rev=161719&r1=161718&r2=161719&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/ExecutionContext.h (original)
+++ lldb/trunk/include/lldb/Target/ExecutionContext.h Fri Aug 10 19:35:26 2012
@@ -729,7 +729,7 @@
     bool
     HasTargetScope () const
     {
-        return m_target_sp;
+        return (bool) m_target_sp;
     }
 
     //------------------------------------------------------------------

Modified: lldb/trunk/source/API/SBBreakpoint.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBBreakpoint.cpp?rev=161719&r1=161718&r2=161719&view=diff
==============================================================================
--- lldb/trunk/source/API/SBBreakpoint.cpp (original)
+++ lldb/trunk/source/API/SBBreakpoint.cpp Fri Aug 10 19:35:26 2012
@@ -124,7 +124,7 @@
 bool
 SBBreakpoint::IsValid() const
 {
-    return m_opaque_sp;
+    return (bool) m_opaque_sp;
 }
 
 void

Modified: lldb/trunk/source/API/SBWatchpoint.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBWatchpoint.cpp?rev=161719&r1=161718&r2=161719&view=diff
==============================================================================
--- lldb/trunk/source/API/SBWatchpoint.cpp (original)
+++ lldb/trunk/source/API/SBWatchpoint.cpp Fri Aug 10 19:35:26 2012
@@ -87,7 +87,7 @@
 bool
 SBWatchpoint::IsValid() const
 {
-    return m_opaque_sp;
+    return (bool) m_opaque_sp;
 }
 
 SBError

Modified: lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp?rev=161719&r1=161718&r2=161719&view=diff
==============================================================================
--- lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp (original)
+++ lldb/trunk/source/Expression/ClangExpressionDeclMap.cpp Fri Aug 10 19:35:26 2012
@@ -3135,7 +3135,7 @@
                 if (log)
                     log->Printf("ClangExpressionDeclMap::ResolveUnknownType - Couldn't import the type for a variable");
                 
-                return lldb::ClangExpressionVariableSP();
+                return (bool) lldb::ClangExpressionVariableSP();
             }
             
             TypeFromUser user_type(copied_type, scratch_ast_context);

Modified: lldb/trunk/source/Expression/IRInterpreter.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/IRInterpreter.cpp?rev=161719&r1=161718&r2=161719&view=diff
==============================================================================
--- lldb/trunk/source/Expression/IRInterpreter.cpp (original)
+++ lldb/trunk/source/Expression/IRInterpreter.cpp Fri Aug 10 19:35:26 2012
@@ -159,7 +159,7 @@
         
         bool IsValid ()
         {
-            return m_allocation;
+            return (bool) m_allocation;
         }
         
         bool IsInvalid ()

Modified: lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp?rev=161719&r1=161718&r2=161719&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp (original)
+++ lldb/trunk/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp Fri Aug 10 19:35:26 2012
@@ -313,7 +313,7 @@
             }
 
             if (did_create_ptr)
-                *did_create_ptr = module_sp;
+                *did_create_ptr = (bool) module_sp;
         }
     }
     return module_sp;

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp?rev=161719&r1=161718&r2=161719&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp Fri Aug 10 19:35:26 2012
@@ -1012,9 +1012,7 @@
                 // this address is resolved. If they are the same, then the
                 // function for this address didn't make it into the final
                 // executable.
-                bool curr_in_final_executable = false;
-                if (info->curr_section_sp->GetLinkedSection ())
-                    curr_in_final_executable = true;
+                bool curr_in_final_executable = (bool) info->curr_section_sp->GetLinkedSection ();
 
                 // If we are doing DWARF with debug map, then we need to carefully
                 // add each line table entry as there may be gaps as functions

Modified: lldb/trunk/source/Target/LanguageRuntime.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/LanguageRuntime.cpp?rev=161719&r1=161718&r2=161719&view=diff
==============================================================================
--- lldb/trunk/source/Target/LanguageRuntime.cpp (original)
+++ lldb/trunk/source/Target/LanguageRuntime.cpp Fri Aug 10 19:35:26 2012
@@ -128,7 +128,7 @@
             if (runtime)
             {
                 m_actual_resolver_sp = runtime->CreateExceptionResolver (m_breakpoint, m_catch_bp, m_throw_bp);
-                return m_actual_resolver_sp;
+                return (bool) m_actual_resolver_sp;
             }
             else
                 return false;

Modified: lldb/trunk/source/Target/Thread.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Thread.cpp?rev=161719&r1=161718&r2=161719&view=diff
==============================================================================
--- lldb/trunk/source/Target/Thread.cpp (original)
+++ lldb/trunk/source/Target/Thread.cpp Fri Aug 10 19:35:26 2012
@@ -136,7 +136,7 @@
 bool
 Thread::ThreadStoppedForAReason (void)
 {
-    return GetPrivateStopReason ();
+    return (bool) GetPrivateStopReason ();
 }
 
 bool





More information about the lldb-commits mailing list