[clang] c0de76c - [Driver] Remove unneeded useRelaxRelocations overrides
Fangrui Song via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 13 10:43:05 PDT 2023
Author: Fangrui Song
Date: 2023-07-13T10:43:01-07:00
New Revision: c0de76cf9f06ba8356c212420d156d42ad1d15b8
URL: https://github.com/llvm/llvm-project/commit/c0de76cf9f06ba8356c212420d156d42ad1d15b8
DIFF: https://github.com/llvm/llvm-project/commit/c0de76cf9f06ba8356c212420d156d42ad1d15b8.diff
LOG: [Driver] Remove unneeded useRelaxRelocations overrides
ENABLE_X86_RELAX_RELOCATIONS has defaulted to on
(c41a18cf61790fc898dcda1055c3efbf442c14c0) for nearly 3 years.
As a clean-up, remove overrides from some early adopters.
Change OHOS to use true as agreed by the patch author D145227.
Added:
Modified:
clang/lib/Driver/ToolChains/Fuchsia.h
clang/lib/Driver/ToolChains/OHOS.h
clang/lib/Driver/ToolChains/PS4CPU.h
Removed:
################################################################################
diff --git a/clang/lib/Driver/ToolChains/Fuchsia.h b/clang/lib/Driver/ToolChains/Fuchsia.h
index ba0ec208fb1299..95e1785c9fac97 100644
--- a/clang/lib/Driver/ToolChains/Fuchsia.h
+++ b/clang/lib/Driver/ToolChains/Fuchsia.h
@@ -56,7 +56,6 @@ class LLVM_LIBRARY_VISIBILITY Fuchsia : public ToolChain {
bool HasNativeLLVMSupport() const override { return true; }
bool IsMathErrnoDefault() const override { return false; }
- bool useRelaxRelocations() const override { return true; };
RuntimeLibType GetDefaultRuntimeLibType() const override {
return ToolChain::RLT_CompilerRT;
}
diff --git a/clang/lib/Driver/ToolChains/OHOS.h b/clang/lib/Driver/ToolChains/OHOS.h
index a06df0eee6e2b1..2a380420922deb 100644
--- a/clang/lib/Driver/ToolChains/OHOS.h
+++ b/clang/lib/Driver/ToolChains/OHOS.h
@@ -36,7 +36,6 @@ class LLVM_LIBRARY_VISIBILITY OHOS : public Generic_ELF {
bool isPICDefault() const override { return false; }
bool isPIEDefault(const llvm::opt::ArgList &Args) const override { return true; }
bool isPICDefaultForced() const override { return false; }
- bool useRelaxRelocations() const override { return false; }
UnwindLibType GetUnwindLibType(const llvm::opt::ArgList &Args) const override;
UnwindLibType GetDefaultUnwindLibType() const override { return UNW_CompilerRT; }
diff --git a/clang/lib/Driver/ToolChains/PS4CPU.h b/clang/lib/Driver/ToolChains/PS4CPU.h
index 0866a5daa4cc6c..a51351d367be84 100644
--- a/clang/lib/Driver/ToolChains/PS4CPU.h
+++ b/clang/lib/Driver/ToolChains/PS4CPU.h
@@ -101,8 +101,6 @@ class LLVM_LIBRARY_VISIBILITY PS4PS5Base : public Generic_ELF {
return llvm::DenormalMode::getPreserveSign();
}
- bool useRelaxRelocations() const override { return true; }
-
// Helper methods for PS4/PS5.
virtual const char *getLinkerBaseName() const = 0;
virtual std::string qualifyPSCmdName(StringRef CmdName) const = 0;
More information about the cfe-commits
mailing list