diff options
Diffstat (limited to 'lib/CodeGen/CGExprConstant.cpp')
-rw-r--r-- | lib/CodeGen/CGExprConstant.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/CodeGen/CGExprConstant.cpp b/lib/CodeGen/CGExprConstant.cpp index 81209da6c6..ca775bf050 100644 --- a/lib/CodeGen/CGExprConstant.cpp +++ b/lib/CodeGen/CGExprConstant.cpp @@ -701,6 +701,14 @@ public: CGM.GetStringForStringLiteral(E), false); } + llvm::Constant *VisitObjCSelectorExpr(const ObjCSelectorExpr *E) { + ObjCMethodDecl *OMD = E->getMethodDecl(); + if (OMD) + return CGM.getObjCRuntime().GetConstantTypedSelector(OMD); + else + return CGM.getObjCRuntime().GetConstantSelector(E->getSelector()); + } + llvm::Constant *VisitObjCEncodeExpr(ObjCEncodeExpr *E) { // This must be an @encode initializing an array in a static initializer. // Don't emit it as the address of the string, emit the string data itself |