[cfe-commits] r89172 - in /cfe/trunk: lib/CodeGen/CGExprAgg.cpp test/CodeGenCXX/rtti.cpp
Mike Stump
mrs at apple.com
Tue Nov 17 16:40:12 PST 2009
Author: mrs
Date: Tue Nov 17 18:40:12 2009
New Revision: 89172
URL: http://llvm.org/viewvc/llvm-project?rev=89172&view=rev
Log:
Fix one last gotcha with typeid.
Modified:
cfe/trunk/lib/CodeGen/CGExprAgg.cpp
cfe/trunk/test/CodeGenCXX/rtti.cpp
Modified: cfe/trunk/lib/CodeGen/CGExprAgg.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGExprAgg.cpp?rev=89172&r1=89171&r2=89172&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGExprAgg.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGExprAgg.cpp Tue Nov 17 18:40:12 2009
@@ -114,6 +114,7 @@
void VisitCXXConstructExpr(const CXXConstructExpr *E);
void VisitCXXExprWithTemporaries(CXXExprWithTemporaries *E);
void VisitCXXZeroInitValueExpr(CXXZeroInitValueExpr *E);
+ void VisitCXXTypeidExpr(CXXTypeidExpr *E) { EmitAggLoadOfLValue(E); }
void VisitVAArgExpr(VAArgExpr *E);
Modified: cfe/trunk/test/CodeGenCXX/rtti.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/rtti.cpp?rev=89172&r1=89171&r2=89172&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/rtti.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/rtti.cpp Tue Nov 17 18:40:12 2009
@@ -193,3 +193,7 @@
if (typeid(int[5]) == typeid(enum a))
return 0;
}
+
+bool test4(std::type_info* __pointee) {
+ return *__pointee == typeid (void);
+}
More information about the cfe-commits
mailing list