[Lldb-commits] [lldb] r135429 - /lldb/trunk/source/Expression/ASTResultSynthesizer.cpp
Sean Callanan
scallanan at apple.com
Mon Jul 18 14:30:18 PDT 2011
Author: spyffe
Date: Mon Jul 18 16:30:18 2011
New Revision: 135429
URL: http://llvm.org/viewvc/llvm-project?rev=135429&view=rev
Log:
Removed a redundant dyn_cast. Thanks to Felipe
Cabecinhas.
Modified:
lldb/trunk/source/Expression/ASTResultSynthesizer.cpp
Modified: lldb/trunk/source/Expression/ASTResultSynthesizer.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/ASTResultSynthesizer.cpp?rev=135429&r1=135428&r2=135429&view=diff
==============================================================================
--- lldb/trunk/source/Expression/ASTResultSynthesizer.cpp (original)
+++ lldb/trunk/source/Expression/ASTResultSynthesizer.cpp Mon Jul 18 16:30:18 2011
@@ -219,21 +219,19 @@
lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_EXPRESSIONS));
ASTContext &Ctx(*m_ast_context);
-
- CompoundStmt *compound_stmt = dyn_cast<CompoundStmt>(Body);
-
- if (!compound_stmt)
+
+ if (!Body)
return false;
- if (compound_stmt->body_empty())
+ if (Body->body_empty())
return false;
- Stmt **last_stmt_ptr = compound_stmt->body_end() - 1;
+ Stmt **last_stmt_ptr = Body->body_end() - 1;
Stmt *last_stmt = *last_stmt_ptr;
while (dyn_cast<NullStmt>(last_stmt))
{
- if (last_stmt_ptr != compound_stmt->body_begin())
+ if (last_stmt_ptr != Body->body_begin())
{
last_stmt_ptr--;
last_stmt = *last_stmt_ptr;
More information about the lldb-commits
mailing list