[PATCH] D148961: [clang] Remove unnecessary virtual inheritance in `TargetInfo`

Sviatoslav Osipov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 21 14:09:12 PDT 2023


Stoorx created this revision.
Herald added a project: All.
Stoorx requested review of this revision.
Herald added a project: clang.

Since the `TargetInfo` has no diamond-like inheritance diagram,
the `virtual` keyword is not necessary.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D148961

Files:
  clang/include/clang/Basic/TargetInfo.h


Index: clang/include/clang/Basic/TargetInfo.h
===================================================================
--- clang/include/clang/Basic/TargetInfo.h
+++ clang/include/clang/Basic/TargetInfo.h
@@ -202,7 +202,7 @@
 
 /// Exposes information about the current target.
 ///
-class TargetInfo : public virtual TransferrableTargetInfo,
+class TargetInfo : public TransferrableTargetInfo,
                    public RefCountedBase<TargetInfo> {
   std::shared_ptr<TargetOptions> TargetOpts;
   llvm::Triple Triple;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D148961.515912.patch
Type: text/x-patch
Size: 516 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230421/8b9a2522/attachment.bin>


More information about the cfe-commits mailing list