forked from OSchip/llvm-project
[CGObjCGNU] Rename GetSelector helper method to fix -Woverloaded-virtual warning (PR38210)
As suggested by @theraven on PR38210, this patch fixes the gcc -Woverloaded-virtual warnings by renaming the extra CGObjCGNU::GetSelector method to CGObjCGNU::GetTypedSelector Differential Revision: https://reviews.llvm.org/D50448 llvm-svn: 339264
This commit is contained in:
parent
abd4767a0d
commit
04c5a34f4f
|
@ -510,7 +510,7 @@ protected:
|
||||||
|
|
||||||
/// Returns a selector with the specified type encoding. An empty string is
|
/// Returns a selector with the specified type encoding. An empty string is
|
||||||
/// used to return an untyped selector (with the types field set to NULL).
|
/// used to return an untyped selector (with the types field set to NULL).
|
||||||
virtual llvm::Value *GetSelector(CodeGenFunction &CGF, Selector Sel,
|
virtual llvm::Value *GetTypedSelector(CodeGenFunction &CGF, Selector Sel,
|
||||||
const std::string &TypeEncoding);
|
const std::string &TypeEncoding);
|
||||||
|
|
||||||
/// Returns the name of ivar offset variables. In the GNUstep v1 ABI, this
|
/// Returns the name of ivar offset variables. In the GNUstep v1 ABI, this
|
||||||
|
@ -1342,7 +1342,7 @@ class CGObjCGNUstep2 : public CGObjCGNUstep {
|
||||||
return Val;
|
return Val;
|
||||||
return llvm::ConstantExpr::getBitCast(Val, Ty);
|
return llvm::ConstantExpr::getBitCast(Val, Ty);
|
||||||
}
|
}
|
||||||
llvm::Value *GetSelector(CodeGenFunction &CGF, Selector Sel,
|
llvm::Value *GetTypedSelector(CodeGenFunction &CGF, Selector Sel,
|
||||||
const std::string &TypeEncoding) override {
|
const std::string &TypeEncoding) override {
|
||||||
return GetConstantSelector(Sel, TypeEncoding);
|
return GetConstantSelector(Sel, TypeEncoding);
|
||||||
}
|
}
|
||||||
|
@ -2121,7 +2121,7 @@ llvm::Value *CGObjCGNU::EmitNSAutoreleasePoolClassRef(CodeGenFunction &CGF) {
|
||||||
return Value;
|
return Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
llvm::Value *CGObjCGNU::GetSelector(CodeGenFunction &CGF, Selector Sel,
|
llvm::Value *CGObjCGNU::GetTypedSelector(CodeGenFunction &CGF, Selector Sel,
|
||||||
const std::string &TypeEncoding) {
|
const std::string &TypeEncoding) {
|
||||||
SmallVectorImpl<TypedSelector> &Types = SelectorTable[Sel];
|
SmallVectorImpl<TypedSelector> &Types = SelectorTable[Sel];
|
||||||
llvm::GlobalAlias *SelValue = nullptr;
|
llvm::GlobalAlias *SelValue = nullptr;
|
||||||
|
@ -2155,13 +2155,13 @@ Address CGObjCGNU::GetAddrOfSelector(CodeGenFunction &CGF, Selector Sel) {
|
||||||
}
|
}
|
||||||
|
|
||||||
llvm::Value *CGObjCGNU::GetSelector(CodeGenFunction &CGF, Selector Sel) {
|
llvm::Value *CGObjCGNU::GetSelector(CodeGenFunction &CGF, Selector Sel) {
|
||||||
return GetSelector(CGF, Sel, std::string());
|
return GetTypedSelector(CGF, Sel, std::string());
|
||||||
}
|
}
|
||||||
|
|
||||||
llvm::Value *CGObjCGNU::GetSelector(CodeGenFunction &CGF,
|
llvm::Value *CGObjCGNU::GetSelector(CodeGenFunction &CGF,
|
||||||
const ObjCMethodDecl *Method) {
|
const ObjCMethodDecl *Method) {
|
||||||
std::string SelTypes = CGM.getContext().getObjCEncodingForMethodDecl(Method);
|
std::string SelTypes = CGM.getContext().getObjCEncodingForMethodDecl(Method);
|
||||||
return GetSelector(CGF, Method->getSelector(), SelTypes);
|
return GetTypedSelector(CGF, Method->getSelector(), SelTypes);
|
||||||
}
|
}
|
||||||
|
|
||||||
llvm::Constant *CGObjCGNU::GetEHType(QualType T) {
|
llvm::Constant *CGObjCGNU::GetEHType(QualType T) {
|
||||||
|
|
Loading…
Reference in New Issue