Remove uses of "Selector&" and "const Selector&", since Selector is just an
immutable smart pointer (we don't need to pass references, just pass Selector). llvm-svn: 49773
This commit is contained in:
parent
bba6a4b367
commit
b65a67d7b6
|
@ -1393,8 +1393,7 @@ public:
|
||||||
: Expr(ObjCSelectorExprClass, T), SelName(selInfo),
|
: Expr(ObjCSelectorExprClass, T), SelName(selInfo),
|
||||||
AtLoc(at), RParenLoc(rp) {}
|
AtLoc(at), RParenLoc(rp) {}
|
||||||
|
|
||||||
const Selector &getSelector() const { return SelName; }
|
Selector getSelector() const { return SelName; }
|
||||||
Selector &getSelector() { return SelName; }
|
|
||||||
|
|
||||||
SourceLocation getAtLoc() const { return AtLoc; }
|
SourceLocation getAtLoc() const { return AtLoc; }
|
||||||
SourceLocation getRParenLoc() const { return RParenLoc; }
|
SourceLocation getRParenLoc() const { return RParenLoc; }
|
||||||
|
@ -1518,7 +1517,6 @@ public:
|
||||||
Expr *getReceiver() { return SubExprs[RECEIVER]; }
|
Expr *getReceiver() { return SubExprs[RECEIVER]; }
|
||||||
|
|
||||||
Selector getSelector() const { return SelName; }
|
Selector getSelector() const { return SelName; }
|
||||||
Selector &getSelector() { return SelName; }
|
|
||||||
|
|
||||||
const ObjCMethodDecl *getMethodDecl() const { return MethodProto; }
|
const ObjCMethodDecl *getMethodDecl() const { return MethodProto; }
|
||||||
ObjCMethodDecl *getMethodDecl() { return MethodProto; }
|
ObjCMethodDecl *getMethodDecl() { return MethodProto; }
|
||||||
|
|
|
@ -231,10 +231,10 @@ public:
|
||||||
return InfoPtr & ArgFlags;
|
return InfoPtr & ArgFlags;
|
||||||
}
|
}
|
||||||
/// operator==/!= - Indicate whether the specified selectors are identical.
|
/// operator==/!= - Indicate whether the specified selectors are identical.
|
||||||
bool operator==(const Selector &RHS) const {
|
bool operator==(Selector RHS) const {
|
||||||
return InfoPtr == RHS.InfoPtr;
|
return InfoPtr == RHS.InfoPtr;
|
||||||
}
|
}
|
||||||
bool operator!=(const Selector &RHS) const {
|
bool operator!=(Selector RHS) const {
|
||||||
return InfoPtr != RHS.InfoPtr;
|
return InfoPtr != RHS.InfoPtr;
|
||||||
}
|
}
|
||||||
void *getAsOpaquePtr() const {
|
void *getAsOpaquePtr() const {
|
||||||
|
|
|
@ -441,7 +441,7 @@ void StmtDumper::VisitObjCSelectorExpr(ObjCSelectorExpr *Node) {
|
||||||
DumpExpr(Node);
|
DumpExpr(Node);
|
||||||
|
|
||||||
fprintf(F, " ");
|
fprintf(F, " ");
|
||||||
Selector &selector = Node->getSelector();
|
Selector selector = Node->getSelector();
|
||||||
fprintf(F, "%s", selector.getName().c_str());
|
fprintf(F, "%s", selector.getName().c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -822,7 +822,7 @@ void StmtPrinter::VisitObjCMessageExpr(ObjCMessageExpr *Mess) {
|
||||||
Expr *receiver = Mess->getReceiver();
|
Expr *receiver = Mess->getReceiver();
|
||||||
if (receiver) PrintExpr(receiver);
|
if (receiver) PrintExpr(receiver);
|
||||||
else OS << Mess->getClassName()->getName();
|
else OS << Mess->getClassName()->getName();
|
||||||
Selector &selector = Mess->getSelector();
|
Selector selector = Mess->getSelector();
|
||||||
if (selector.isUnarySelector()) {
|
if (selector.isUnarySelector()) {
|
||||||
OS << " " << selector.getIdentifierInfoForSlot(0)->getName();
|
OS << " " << selector.getIdentifierInfoForSlot(0)->getName();
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue