[all-commits] [llvm/llvm-project] f93a6a: [Inliner][NFC] silence gcc 'overloaded-virtual' wa...

Fedor Sergeev via All-commits all-commits at lists.llvm.org
Sun May 17 02:52:21 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: f93a6aaebcf47528e51a6d943ca7699412f30234
      https://github.com/llvm/llvm-project/commit/f93a6aaebcf47528e51a6d943ca7699412f30234
  Author: Fedor Sergeev <fedor.sergeev at azul.com>
  Date:   2020-05-17 (Sun, 17 May 2020)

  Changed paths:
    M llvm/include/llvm/Transforms/IPO/Inliner.h

  Log Message:
  -----------
  [Inliner][NFC] silence gcc 'overloaded-virtual' warning on hiding of Pass::doInitialization

When compiling with -Werror=overloaded-virtual, gcc emits this:
====
llvm/include/llvm/Pass.h:102:16: error: ‘virtual bool llvm::Pass::doInitialization(llvm::Module&)’ was hidden [-Werror=overloaded-virtual]
   virtual bool doInitialization(Module &)  { return false; }
                ^~~~~~~~~~~~~~~~
In file included from llvm/lib/Transforms/IPO/Inliner.cpp:20:0:
llvm/include/llvm/Transforms/IPO/Inliner.h:38:8: error:   by ‘virtual bool llvm::LegacyInlinerBase::doInitialization(llvm::CallGraph&)’ [-Werror=overloaded-virtual]
   bool doInitialization(CallGraph &CG) override;
        ^~~~~~~~~~~~~~~~
====

This is an old issue which has just started biting our downstream after
a slight rearrangement of includes around Inliner.
Fixing it similar to how doFinalization was done years ago.




More information about the All-commits mailing list