avoid a noop virtual method call on the hot scope poping path.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42809 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Parse/Parser.cpp b/Parse/Parser.cpp
index 2683582..117afab 100644
--- a/Parse/Parser.cpp
+++ b/Parse/Parser.cpp
@@ -189,8 +189,10 @@
 void Parser::ExitScope() {
   assert(CurScope && "Scope imbalance!");
 
-  // Inform the actions module that this scope is going away.
-  Actions.PopScope(Tok.getLocation(), CurScope);
+  // Inform the actions module that this scope is going away if there are any
+  // decls in it.
+  if (!CurScope->decl_empty())
+    Actions.PopScope(Tok.getLocation(), CurScope);
   
   Scope *OldScope = CurScope;
   CurScope = OldScope->getParent();