diff options
author | Jim Ingham <jingham@apple.com> | 2012-08-11 00:35:26 +0000 |
---|---|---|
committer | Jim Ingham <jingham@apple.com> | 2012-08-11 00:35:26 +0000 |
commit | f94e179172b82f9692eefb2e11ad80f116b5ba16 (patch) | |
tree | b904343d1eac036a574d3e5d56ce983d03871c22 /lldb | |
parent | d6551dc0bf74c902bee3082f2ea6b6b5bfc41e28 (diff) | |
download | bcm5719-llvm-f94e179172b82f9692eefb2e11ad80f116b5ba16.tar.gz bcm5719-llvm-f94e179172b82f9692eefb2e11ad80f116b5ba16.zip |
Add explicit casts to bool in "shared pointer is valid" constructs that return bool.
llvm-svn: 161719
Diffstat (limited to 'lldb')
-rw-r--r-- | lldb/include/lldb/Target/ExecutionContext.h | 2 | ||||
-rw-r--r-- | lldb/source/API/SBBreakpoint.cpp | 2 | ||||
-rw-r--r-- | lldb/source/API/SBWatchpoint.cpp | 2 | ||||
-rw-r--r-- | lldb/source/Expression/ClangExpressionDeclMap.cpp | 2 | ||||
-rw-r--r-- | lldb/source/Expression/IRInterpreter.cpp | 2 | ||||
-rw-r--r-- | lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp | 2 | ||||
-rw-r--r-- | lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp | 4 | ||||
-rw-r--r-- | lldb/source/Target/LanguageRuntime.cpp | 2 | ||||
-rw-r--r-- | lldb/source/Target/Thread.cpp | 2 |
9 files changed, 9 insertions, 11 deletions
diff --git a/lldb/include/lldb/Target/ExecutionContext.h b/lldb/include/lldb/Target/ExecutionContext.h index 7f3e77e49d6..880de01c689 100644 --- a/lldb/include/lldb/Target/ExecutionContext.h +++ b/lldb/include/lldb/Target/ExecutionContext.h @@ -729,7 +729,7 @@ public: bool HasTargetScope () const { - return m_target_sp; + return (bool) m_target_sp; } //------------------------------------------------------------------ diff --git a/lldb/source/API/SBBreakpoint.cpp b/lldb/source/API/SBBreakpoint.cpp index 3adb031e036..6fc4cd953b1 100644 --- a/lldb/source/API/SBBreakpoint.cpp +++ b/lldb/source/API/SBBreakpoint.cpp @@ -124,7 +124,7 @@ SBBreakpoint::GetID () const bool SBBreakpoint::IsValid() const { - return m_opaque_sp; + return (bool) m_opaque_sp; } void diff --git a/lldb/source/API/SBWatchpoint.cpp b/lldb/source/API/SBWatchpoint.cpp index 594584c0391..4794ba4c501 100644 --- a/lldb/source/API/SBWatchpoint.cpp +++ b/lldb/source/API/SBWatchpoint.cpp @@ -87,7 +87,7 @@ SBWatchpoint::GetID () bool SBWatchpoint::IsValid() const { - return m_opaque_sp; + return (bool) m_opaque_sp; } SBError diff --git a/lldb/source/Expression/ClangExpressionDeclMap.cpp b/lldb/source/Expression/ClangExpressionDeclMap.cpp index 68467a708ea..da645f1bbac 100644 --- a/lldb/source/Expression/ClangExpressionDeclMap.cpp +++ b/lldb/source/Expression/ClangExpressionDeclMap.cpp @@ -3135,7 +3135,7 @@ ClangExpressionDeclMap::ResolveUnknownTypes() 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); diff --git a/lldb/source/Expression/IRInterpreter.cpp b/lldb/source/Expression/IRInterpreter.cpp index 5d2c09724f7..5c09e6da753 100644 --- a/lldb/source/Expression/IRInterpreter.cpp +++ b/lldb/source/Expression/IRInterpreter.cpp @@ -159,7 +159,7 @@ public: bool IsValid () { - return m_allocation; + return (bool) m_allocation; } bool IsInvalid () diff --git a/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp b/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp index 5c1bfc10758..bc87588f0ea 100644 --- a/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp +++ b/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp @@ -313,7 +313,7 @@ DynamicLoaderMacOSXDYLD::FindTargetModuleForDYLDImageInfo (const DYLDImageInfo & } if (did_create_ptr) - *did_create_ptr = module_sp; + *did_create_ptr = (bool) module_sp; } } return module_sp; diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp index 559bb7352f3..bce6c2f8134 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp @@ -1012,9 +1012,7 @@ ParseDWARFLineTableCallback(dw_offset_t offset, const DWARFDebugLine::State& sta // 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 diff --git a/lldb/source/Target/LanguageRuntime.cpp b/lldb/source/Target/LanguageRuntime.cpp index 3891d81d167..d9f7e0f965c 100644 --- a/lldb/source/Target/LanguageRuntime.cpp +++ b/lldb/source/Target/LanguageRuntime.cpp @@ -128,7 +128,7 @@ LanguageRuntime::ExceptionBreakpointResolver::SetActualResolver() 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; diff --git a/lldb/source/Target/Thread.cpp b/lldb/source/Target/Thread.cpp index dc8d133c100..0513e3308d3 100644 --- a/lldb/source/Target/Thread.cpp +++ b/lldb/source/Target/Thread.cpp @@ -136,7 +136,7 @@ Thread::SetStopInfoToNothing() bool Thread::ThreadStoppedForAReason (void) { - return GetPrivateStopReason (); + return (bool) GetPrivateStopReason (); } bool |