[llvm-branch-commits] [clang] [mlir] [llvm] Refactor ModuleToObject to offer more flexibility to subclass (NFC) (PR #71165)

Mehdi Amini via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Nov 3 11:02:35 PDT 2023


================
@@ -39,32 +39,32 @@ ModuleToObject::ModuleToObject(Operation &module, StringRef triple,
     : module(module), triple(triple), chip(chip), features(features),
       optLevel(optLevel) {}
 
+ModuleToObject::~ModuleToObject() = default;
+
 Operation &ModuleToObject::getOperation() { return module; }
 
-std::unique_ptr<llvm::TargetMachine> ModuleToObject::createTargetMachine() {
+std::optional<llvm::TargetMachine *>
+ModuleToObject::getOrCreateTargetMachine() {
   std::string error;
----------------
joker-eph wrote:

Thanks!

https://github.com/llvm/llvm-project/pull/71165


More information about the llvm-branch-commits mailing list