[Lldb-commits] [lldb] r117725 - in /lldb/trunk/source: Commands/CommandObjectImage.cpp Symbol/SymbolContext.cpp
Johnny Chen
johnny.chen at apple.com
Fri Oct 29 15:18:43 PDT 2010
Author: johnny
Date: Fri Oct 29 17:18:43 2010
New Revision: 117725
URL: http://llvm.org/viewvc/llvm-project?rev=117725&view=rev
Log:
These two casts are up casts, no need to use dynamic_cast.
Modified:
lldb/trunk/source/Commands/CommandObjectImage.cpp
lldb/trunk/source/Symbol/SymbolContext.cpp
Modified: lldb/trunk/source/Commands/CommandObjectImage.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectImage.cpp?rev=117725&r1=117724&r2=117725&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectImage.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectImage.cpp Fri Oct 29 17:18:43 2010
@@ -82,7 +82,7 @@
if (i > 0)
strm << "\n\n";
- strm << "Line table for " << *dynamic_cast<FileSpec*> (sc.comp_unit) << " in `"
+ strm << "Line table for " << *static_cast<FileSpec*> (sc.comp_unit) << " in `"
<< module->GetFileSpec().GetFilename() << "\n";
LineTable *line_table = sc.comp_unit->GetLineTable();
if (line_table)
Modified: lldb/trunk/source/Symbol/SymbolContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/SymbolContext.cpp?rev=117725&r1=117724&r2=117725&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/SymbolContext.cpp (original)
+++ lldb/trunk/source/Symbol/SymbolContext.cpp Fri Oct 29 17:18:43 2010
@@ -303,7 +303,7 @@
s->Indent();
*s << "CompileUnit = " << (void *)comp_unit;
if (comp_unit != NULL)
- *s << " {0x" << comp_unit->GetID() << "} " << *(dynamic_cast<FileSpec*> (comp_unit));
+ *s << " {0x" << comp_unit->GetID() << "} " << *(static_cast<FileSpec*> (comp_unit));
s->EOL();
s->Indent();
*s << "Function = " << (void *)function;
More information about the lldb-commits
mailing list