summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSean Callanan <scallanan@apple.com>2011-07-18 21:30:18 +0000
committerSean Callanan <scallanan@apple.com>2011-07-18 21:30:18 +0000
commit22c52d9a982313c5896f3ba0d9e8ba009ed51e88 (patch)
tree8153b896f7c8dde69cb42913aece82562364b95c
parent0c0acb02d58ad6fd9245d4dc381eeca0cf8ec517 (diff)
downloadbcm5719-llvm-22c52d9a982313c5896f3ba0d9e8ba009ed51e88.tar.gz
bcm5719-llvm-22c52d9a982313c5896f3ba0d9e8ba009ed51e88.zip
Removed a redundant dyn_cast. Thanks to Felipe
Cabecinhas. llvm-svn: 135429
-rw-r--r--lldb/source/Expression/ASTResultSynthesizer.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/lldb/source/Expression/ASTResultSynthesizer.cpp b/lldb/source/Expression/ASTResultSynthesizer.cpp
index 0286f7ad261..e4c1aa6c2f0 100644
--- a/lldb/source/Expression/ASTResultSynthesizer.cpp
+++ b/lldb/source/Expression/ASTResultSynthesizer.cpp
@@ -219,21 +219,19 @@ ASTResultSynthesizer::SynthesizeBodyResult (CompoundStmt *Body,
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;
OpenPOWER on IntegriCloud