[all-commits] [llvm/llvm-project] d923f4: [mlir][NVVM|ROCDL] Explicitly construct the return...

Fabian Mora via All-commits all-commits at lists.llvm.org
Sat Aug 12 17:25:48 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d923f4c2d824f42817d5a1d8fee9272ce3923f42
      https://github.com/llvm/llvm-project/commit/d923f4c2d824f42817d5a1d8fee9272ce3923f42
  Author: Fabian Mora <fmora.dev at gmail.com>
  Date:   2023-08-13 (Sun, 13 Aug 2023)

  Changed paths:
    M mlir/lib/Target/LLVM/NVVM/Target.cpp
    M mlir/lib/Target/LLVM/ROCDL/Target.cpp

  Log Message:
  -----------
  [mlir][NVVM|ROCDL] Explicitly construct the return type in loadBitcodeFiles in (NVVM|ROCDL)Target

Fix a build failure in GCC 7 caused by the function:
`std::optional<SmallVector<std::unique_ptr<llvm::Module>>> loadBitcodeFiles` ,
in `NVVMTarget` & `ROCDLTarget`.
The failure is caused because GCC fails to use the move constructor in
`std::optional` for constructing the return value, which prompts a call to the
deleted copy constructor in `std::unique_ptr`, resulting in a failure.

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D157804




More information about the All-commits mailing list