Add @selector(...) codegen support.

llvm-svn: 54665
This commit is contained in:
Daniel Dunbar 2008-08-12 03:55:34 +00:00
parent cb515c8b0a
commit bceb904f91
1 changed files with 5 additions and 0 deletions

View File

@ -134,6 +134,7 @@ public:
return EmitLoadOfLValue(E);
}
Value *VisitObjCMessageExpr(ObjCMessageExpr *E);
Value *VisitObjCSelectorExpr(ObjCSelectorExpr *E);
Value *VisitObjCIvarRefExpr(ObjCIvarRefExpr *E) { return EmitLoadOfLValue(E);}
Value *VisitArraySubscriptExpr(ArraySubscriptExpr *E);
Value *VisitShuffleVectorExpr(ShuffleVectorExpr *E);
@ -501,6 +502,10 @@ Value *ScalarExprEmitter::VisitObjCMessageExpr(ObjCMessageExpr *E) {
&Args[0], Args.size());
}
Value *ScalarExprEmitter::VisitObjCSelectorExpr(ObjCSelectorExpr *E) {
return Runtime->GetSelector(Builder, E->getSelector());
}
Value *ScalarExprEmitter::VisitArraySubscriptExpr(ArraySubscriptExpr *E) {
// Emit subscript expressions in rvalue context's. For most cases, this just
// loads the lvalue formed by the subscript expr. However, we have to be