forked from OSchip/llvm-project
ELF: Return TargetRelocationHandler instead of <ArcH>TargetRelocationHandler.
getRelocationHandler is a public interface to get an instance of TargetRelocationHandler. We don't use any member function other than applyRelocations to a returned instance. Returning a base class instance suffices here. (If a return type is a derived class, it looks like we were using derived classes features.) llvm-svn: 234081
This commit is contained in:
parent
55f5b2b277
commit
59b0bfef0d
|
@ -27,7 +27,7 @@ class AArch64TargetHandler final : public TargetHandler {
|
|||
public:
|
||||
AArch64TargetHandler(AArch64LinkingContext &ctx);
|
||||
|
||||
const AArch64TargetRelocationHandler &getRelocationHandler() const override {
|
||||
const TargetRelocationHandler &getRelocationHandler() const override {
|
||||
return *_relocationHandler;
|
||||
}
|
||||
|
||||
|
|
|
@ -67,7 +67,7 @@ class ARMTargetHandler final : public TargetHandler {
|
|||
public:
|
||||
ARMTargetHandler(ARMLinkingContext &ctx);
|
||||
|
||||
const ARMTargetRelocationHandler &getRelocationHandler() const override {
|
||||
const TargetRelocationHandler &getRelocationHandler() const override {
|
||||
return *_relocationHandler;
|
||||
}
|
||||
|
||||
|
|
|
@ -107,7 +107,7 @@ class HexagonTargetHandler final : public TargetHandler {
|
|||
public:
|
||||
HexagonTargetHandler(HexagonLinkingContext &targetInfo);
|
||||
|
||||
const HexagonTargetRelocationHandler &getRelocationHandler() const override {
|
||||
const TargetRelocationHandler &getRelocationHandler() const override {
|
||||
return *_relocationHandler;
|
||||
}
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ class X86TargetHandler final : public TargetHandler {
|
|||
public:
|
||||
X86TargetHandler(X86LinkingContext &ctx);
|
||||
|
||||
const X86TargetRelocationHandler &getRelocationHandler() const override {
|
||||
const TargetRelocationHandler &getRelocationHandler() const override {
|
||||
return *_relocationHandler;
|
||||
}
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ class X86_64TargetHandler : public TargetHandler {
|
|||
public:
|
||||
X86_64TargetHandler(X86_64LinkingContext &ctx);
|
||||
|
||||
const X86_64TargetRelocationHandler &getRelocationHandler() const override {
|
||||
const TargetRelocationHandler &getRelocationHandler() const override {
|
||||
return *_relocationHandler;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue