[clang] 2c3cae3 - Remove unused clang::TargetInfo::adjustTargetOptions

Fangrui Song via cfe-commits cfe-commits at lists.llvm.org
Sun Sep 24 16:37:29 PDT 2023


Author: Fangrui Song
Date: 2023-09-24T16:37:24-07:00
New Revision: 2c3cae3f01b10a2ba3745761e11b63a2b129eee9

URL: https://github.com/llvm/llvm-project/commit/2c3cae3f01b10a2ba3745761e11b63a2b129eee9
DIFF: https://github.com/llvm/llvm-project/commit/2c3cae3f01b10a2ba3745761e11b63a2b129eee9.diff

LOG: Remove unused clang::TargetInfo::adjustTargetOptions

The hook introduced by https://reviews.llvm.org/D22815 for AMDGPU was
removed by commit ce2258c1cd5dc9cf20040d1b1e540d80250c1435 in 2020.

Added: 
    

Modified: 
    clang/include/clang/Basic/TargetInfo.h
    clang/lib/Frontend/CompilerInstance.cpp

Removed: 
    


################################################################################
diff  --git a/clang/include/clang/Basic/TargetInfo.h b/clang/include/clang/Basic/TargetInfo.h
index 61be52149341f01..9d56e97a3d4bb88 100644
--- a/clang/include/clang/Basic/TargetInfo.h
+++ b/clang/include/clang/Basic/TargetInfo.h
@@ -1260,10 +1260,6 @@ class TargetInfo : public TransferrableTargetInfo,
   /// the language based on the target options where applicable.
   virtual void adjust(DiagnosticsEngine &Diags, LangOptions &Opts);
 
-  /// Adjust target options based on codegen options.
-  virtual void adjustTargetOptions(const CodeGenOptions &CGOpts,
-                                   TargetOptions &TargetOpts) const {}
-
   /// Initialize the map with the default set of target features for the
   /// CPU this should include all legal feature strings on the target.
   ///

diff  --git a/clang/lib/Frontend/CompilerInstance.cpp b/clang/lib/Frontend/CompilerInstance.cpp
index 49c1d8e553a1df6..aacbb2050334411 100644
--- a/clang/lib/Frontend/CompilerInstance.cpp
+++ b/clang/lib/Frontend/CompilerInstance.cpp
@@ -151,9 +151,6 @@ bool CompilerInstance::createTarget() {
   // created. This complexity should be lifted elsewhere.
   getTarget().adjust(getDiagnostics(), getLangOpts());
 
-  // Adjust target options based on codegen options.
-  getTarget().adjustTargetOptions(getCodeGenOpts(), getTargetOpts());
-
   if (auto *Aux = getAuxTarget())
     getTarget().setAuxTarget(Aux);
 


        


More information about the cfe-commits mailing list