[PATCH] D36876: [IRGen] Evaluate constant static variables referenced through member expressions
John McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 22 20:54:27 PDT 2017
rjmccall added inline comments.
================
Comment at: lib/CodeGen/CGExprComplex.cpp:163
+ else
+ CGF.EmitLValue(ME->getBase());
+ return *Constant;
----------------
There's an EmitIgnoredExpr you could use.
Also, I think it would be fine to add a generic tryEmitMemberExprAsConstant that takes a MemberExpr and does this DRE stuff behind the scenes; it's not at all different for the different emitters.
Repository:
rL LLVM
https://reviews.llvm.org/D36876
More information about the cfe-commits
mailing list