[clang] 940b020 - [clang][CodeGen] Break up TargetInfo.cpp [3/8]
Sergei Barannikov via cfe-commits
cfe-commits at lists.llvm.org
Fri May 19 13:55:34 PDT 2023
Author: Sergei Barannikov
Date: 2023-05-19T23:55:08+03:00
New Revision: 940b02095bf986b5bcc365dc97667a27176c3b13
URL: https://github.com/llvm/llvm-project/commit/940b02095bf986b5bcc365dc97667a27176c3b13
DIFF: https://github.com/llvm/llvm-project/commit/940b02095bf986b5bcc365dc97667a27176c3b13.diff
LOG: [clang][CodeGen] Break up TargetInfo.cpp [3/8]
Don't derive from `DefaultTargetCodeGenInfo`.
This class is going to stay in `TargetInfo.cpp`, whereas its derivants
are going to be moved to separate translation units. Just derive from
the base `TargetCodeGenInfo` class instead.
Reviewed By: efriedma
Differential Revision: https://reviews.llvm.org/D148091
Added:
Modified:
clang/lib/CodeGen/TargetInfo.cpp
Removed:
################################################################################
diff --git a/clang/lib/CodeGen/TargetInfo.cpp b/clang/lib/CodeGen/TargetInfo.cpp
index 078bd1087220..4a4426528c37 100644
--- a/clang/lib/CodeGen/TargetInfo.cpp
+++ b/clang/lib/CodeGen/TargetInfo.cpp
@@ -5049,9 +5049,10 @@ class PPC64_SVR4_TargetCodeGenInfo : public TargetCodeGenInfo {
llvm::Value *Address) const override;
};
-class PPC64TargetCodeGenInfo : public DefaultTargetCodeGenInfo {
+class PPC64TargetCodeGenInfo : public TargetCodeGenInfo {
public:
- PPC64TargetCodeGenInfo(CodeGenTypes &CGT) : DefaultTargetCodeGenInfo(CGT) {}
+ PPC64TargetCodeGenInfo(CodeGenTypes &CGT)
+ : TargetCodeGenInfo(std::make_unique<DefaultABIInfo>(CGT)) {}
int getDwarfEHStackPointer(CodeGen::CodeGenModule &M) const override {
// This is recovered from gcc output.
@@ -5061,7 +5062,6 @@ class PPC64TargetCodeGenInfo : public DefaultTargetCodeGenInfo {
bool initDwarfEHRegSizeTable(CodeGen::CodeGenFunction &CGF,
llvm::Value *Address) const override;
};
-
}
// Return true if the ABI requires Ty to be passed sign- or zero-
@@ -8584,10 +8584,10 @@ class AVRTargetCodeGenInfo : public TargetCodeGenInfo {
namespace {
-class TCETargetCodeGenInfo : public DefaultTargetCodeGenInfo {
+class TCETargetCodeGenInfo : public TargetCodeGenInfo {
public:
TCETargetCodeGenInfo(CodeGenTypes &CGT)
- : DefaultTargetCodeGenInfo(CGT) {}
+ : TargetCodeGenInfo(std::make_unique<DefaultABIInfo>(CGT)) {}
void setTargetAttributes(const Decl *D, llvm::GlobalValue *GV,
CodeGen::CodeGenModule &M) const override;
More information about the cfe-commits
mailing list