r205178 - Slightly improve the readability of MicrosoftVTableContext::computeVTablePaths(). No functionality changes.

Timur Iskhodzhanov timurrrr at google.com
Mon Mar 31 04:01:51 PDT 2014


Author: timurrrr
Date: Mon Mar 31 06:01:51 2014
New Revision: 205178

URL: http://llvm.org/viewvc/llvm-project?rev=205178&view=rev
Log:
Slightly improve the readability of MicrosoftVTableContext::computeVTablePaths().  No functionality changes.

Modified:
    cfe/trunk/lib/AST/VTableBuilder.cpp

Modified: cfe/trunk/lib/AST/VTableBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/VTableBuilder.cpp?rev=205178&r1=205177&r2=205178&view=diff
==============================================================================
--- cfe/trunk/lib/AST/VTableBuilder.cpp (original)
+++ cfe/trunk/lib/AST/VTableBuilder.cpp Mon Mar 31 06:01:51 2014
@@ -3215,13 +3215,13 @@ void MicrosoftVTableContext::computeVTab
       Paths.push_back(P);
     }
 
+    if (B.isVirtual())
+      VBasesSeen.insert(Base);
+
     // After visiting any direct base, we've transitively visited all of its
     // morally virtual bases.
     for (const auto &VB : Base->vbases())
       VBasesSeen.insert(VB.getType()->getAsCXXRecordDecl());
-
-    if (B.isVirtual())
-      VBasesSeen.insert(Base);
   }
 
   // Sort the paths into buckets, and if any of them are ambiguous, extend all





More information about the cfe-commits mailing list