[PATCH] D148091: [clang][CodeGen] Break up TargetInfo.cpp [3/6]
Sergei Barannikov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 12 03:36:00 PDT 2023
barannikov88 created this revision.
Herald added a project: All.
barannikov88 added reviewers: rjmccall, aaron.ballman, erichkeane.
barannikov88 published this revision for review.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
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.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D148091
Files:
clang/lib/CodeGen/TargetInfo.cpp
Index: clang/lib/CodeGen/TargetInfo.cpp
===================================================================
--- clang/lib/CodeGen/TargetInfo.cpp
+++ clang/lib/CodeGen/TargetInfo.cpp
@@ -5064,9 +5064,10 @@
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.
@@ -8599,10 +8600,10 @@
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;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D148091.512716.patch
Type: text/x-patch
Size: 1188 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230412/25e36c17/attachment.bin>
More information about the cfe-commits
mailing list