[PATCH] CodeGen: Implement the hint value for dyn_cast as described in the Itanium C++ ABI.

Benjamin Kramer benny.kra at gmail.com
Sat Feb 2 14:58:30 PST 2013



================
Comment at: lib/CodeGen/CGExprCXX.cpp:1739-1740
@@ +1738,4 @@
+
+      // Accumulate the base class offsets.
+      if (NumPublicPaths == 0) {
+        const ASTRecordLayout &Layout = Context.getASTRecordLayout(J->Class);
----------------
Chandler Carruth wrote:
> continue instead?
> 
> I'm almost tempted to suggest unswitching this, and having two for loops...
Unswitching is premature optimization imo. This isn't the hot path, that's stashed away in isDerivedFrom.


http://llvm-reviews.chandlerc.com/D364



More information about the cfe-commits mailing list