Author: David Blaikie Date: 2022-10-05T20:22:19Z New Revision: b61860e63e34d955a9841389583978af93c2b97a
URL: https://github.com/llvm/llvm-project/commit/b61860e63e34d955a9841389583978af93c2b97a DIFF: https://github.com/llvm/llvm-project/commit/b61860e63e34d955a9841389583978af93c2b97a.diff LOG: Use inheriting ctors for OSTargetInfo (& remove PSPTargetInfo because it's unused - it had the wrong ctor in it anyway, so wouldn't've been able to be instantiated - must've happened due to bitrot over the years) Added: Modified: clang/lib/Basic/Targets/OSTargets.h Removed: ################################################################################ diff --git a/clang/lib/Basic/Targets/OSTargets.h b/clang/lib/Basic/Targets/OSTargets.h index c75f7d9fbafeb..2d1a33ad9c0bc 100644 --- a/clang/lib/Basic/Targets/OSTargets.h +++ b/clang/lib/Basic/Targets/OSTargets.h @@ -50,8 +50,7 @@ class LLVM_LIBRARY_VISIBILITY CloudABITargetInfo : public OSTargetInfo<Target> { } public: - CloudABITargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts) - : OSTargetInfo<Target>(Triple, Opts) {} + using OSTargetInfo<Target>::OSTargetInfo; }; // Ananas target @@ -66,8 +65,7 @@ class LLVM_LIBRARY_VISIBILITY AnanasTargetInfo : public OSTargetInfo<Target> { } public: - AnanasTargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts) - : OSTargetInfo<Target>(Triple, Opts) {} + using OSTargetInfo<Target>::OSTargetInfo; }; void getDarwinDefines(MacroBuilder &Builder, const LangOptions &Opts, @@ -280,8 +278,7 @@ class LLVM_LIBRARY_VISIBILITY KFreeBSDTargetInfo : public OSTargetInfo<Target> { } public: - KFreeBSDTargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts) - : OSTargetInfo<Target>(Triple, Opts) {} + using OSTargetInfo<Target>::OSTargetInfo; }; // Haiku Target @@ -336,8 +333,7 @@ class LLVM_LIBRARY_VISIBILITY HurdTargetInfo : public OSTargetInfo<Target> { Builder.defineMacro("_GNU_SOURCE"); } public: - HurdTargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts) - : OSTargetInfo<Target>(Triple, Opts) {} + using OSTargetInfo<Target>::OSTargetInfo; }; // Minix Target @@ -360,8 +356,7 @@ class LLVM_LIBRARY_VISIBILITY MinixTargetInfo : public OSTargetInfo<Target> { } public: - MinixTargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts) - : OSTargetInfo<Target>(Triple, Opts) {} + using OSTargetInfo<Target>::OSTargetInfo; }; // Linux target @@ -499,23 +494,6 @@ class LLVM_LIBRARY_VISIBILITY OpenBSDTargetInfo : public OSTargetInfo<Target> { } }; -// PSP Target -template <typename Target> -class LLVM_LIBRARY_VISIBILITY PSPTargetInfo : public OSTargetInfo<Target> { -protected: - void getOSDefines(const LangOptions &Opts, const llvm::Triple &Triple, - MacroBuilder &Builder) const override { - // PSP defines; list based on the output of the pspdev gcc toolchain. - Builder.defineMacro("PSP"); - Builder.defineMacro("_PSP"); - Builder.defineMacro("__psp__"); - Builder.defineMacro("__ELF__"); - } - -public: - PSPTargetInfo(const llvm::Triple &Triple) : OSTargetInfo<Target>(Triple) {} -}; - // PS3 PPU Target template <typename Target> class LLVM_LIBRARY_VISIBILITY PS3PPUTargetInfo : public OSTargetInfo<Target> { @@ -595,8 +573,7 @@ class LLVM_LIBRARY_VISIBILITY PS4OSTargetInfo : public PSOSTargetInfo<Target> { } public: - PS4OSTargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts) - : PSOSTargetInfo<Target>(Triple, Opts) {} + using PSOSTargetInfo<Target>::PSOSTargetInfo; }; // PS5 Target @@ -612,8 +589,7 @@ class LLVM_LIBRARY_VISIBILITY PS5OSTargetInfo : public PSOSTargetInfo<Target> { } public: - PS5OSTargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts) - : PSOSTargetInfo<Target>(Triple, Opts) {} + using PSOSTargetInfo<Target>::PSOSTargetInfo; }; // RTEMS Target @@ -986,8 +962,7 @@ class LLVM_LIBRARY_VISIBILITY WASITargetInfo } public: - explicit WASITargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts) - : WebAssemblyOSTargetInfo<Target>(Triple, Opts) {} + using WebAssemblyOSTargetInfo<Target>::WebAssemblyOSTargetInfo; }; // Emscripten target _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits