[Lldb-commits] [PATCH] D102677: [lldb][NFC] Remove misleading ModulePass base class for IRForTarget
Raphael Isemann via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue May 25 04:27:29 PDT 2021
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG1dee479ff632: [lldb][NFC] Remove misleading ModulePass base class for IRForTarget (authored by teemperor).
Herald added a subscriber: lldb-commits.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102677/new/
https://reviews.llvm.org/D102677
Files:
lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp
lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.h
Index: lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.h
===================================================================
--- lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.h
+++ lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.h
@@ -58,7 +58,7 @@
/// transformations to the IR which make it relocatable. These
/// transformations are discussed in more detail next to their relevant
/// functions.
-class IRForTarget : public llvm::ModulePass {
+class IRForTarget {
public:
enum class LookupResult { Success, Fail, Ignore };
@@ -87,9 +87,6 @@
lldb_private::Stream &error_stream,
const char *func_name = "$__lldb_expr");
- /// Destructor
- ~IRForTarget() override;
-
/// Run this IR transformer on a single module
///
/// Implementation of the llvm::ModulePass::runOnModule() function.
@@ -101,20 +98,7 @@
///
/// \return
/// True on success; false otherwise
- bool runOnModule(llvm::Module &llvm_module) override;
-
- /// Interface stub
- ///
- /// Implementation of the llvm::ModulePass::assignPassManager() function.
- void assignPassManager(llvm::PMStack &pass_mgr_stack,
- llvm::PassManagerType pass_mgr_type =
- llvm::PMT_ModulePassManager) override;
-
- /// Returns PMT_ModulePassManager
- ///
- /// Implementation of the llvm::ModulePass::getPotentialPassManagerType()
- /// function.
- llvm::PassManagerType getPotentialPassManagerType() const override;
+ bool runOnModule(llvm::Module &llvm_module);
private:
/// Ensures that the current function's linkage is set to external.
Index: lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp
===================================================================
--- lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp
+++ lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp
@@ -41,8 +41,6 @@
using namespace llvm;
-static char ID;
-
typedef SmallVector<Instruction *, 2> InstrList;
IRForTarget::FunctionValueCache::FunctionValueCache(Maker const &maker)
@@ -72,7 +70,7 @@
lldb_private::IRExecutionUnit &execution_unit,
lldb_private::Stream &error_stream,
const char *func_name)
- : ModulePass(ID), m_resolve_vars(resolve_vars), m_func_name(func_name),
+ : m_resolve_vars(resolve_vars), m_func_name(func_name),
m_decl_map(decl_map), m_error_stream(error_stream),
m_execution_unit(execution_unit),
m_entry_instruction_finder(FindEntryInstruction) {}
@@ -101,8 +99,6 @@
return s;
}
-IRForTarget::~IRForTarget() {}
-
bool IRForTarget::FixFunctionLinkage(llvm::Function &llvm_function) {
llvm_function.setLinkage(GlobalValue::ExternalLinkage);
@@ -2018,10 +2014,3 @@
return true;
}
-
-void IRForTarget::assignPassManager(PMStack &pass_mgr_stack,
- PassManagerType pass_mgr_type) {}
-
-PassManagerType IRForTarget::getPotentialPassManagerType() const {
- return PMT_ModulePassManager;
-}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102677.347633.patch
Type: text/x-patch
Size: 3081 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20210525/f8d88e58/attachment.bin>
More information about the lldb-commits
mailing list