[mlir][llvmir] Simpler error handling in ConvertFromLLVMIR (nfc).
authorTobias Gysi <tobias.gysi@nextsilicon.com>
Thu, 6 Oct 2022 14:11:58 +0000 (17:11 +0300)
committerTobias Gysi <tobias.gysi@nextsilicon.com>
Thu, 6 Oct 2022 14:33:09 +0000 (17:33 +0300)
commitf47d5dce61cf2704dc15761cea8da4eaf1a7941a
tree8c55754cb566ac3038bb5c4fa3b430583b4e1059
parent87883740ebb3f733985d47e7b3d6b0a4e6670c78
[mlir][llvmir] Simpler error handling in ConvertFromLLVMIR (nfc).

The revision renames some methods of the Importer and changes
the error handling to be closer the ModuleTranslation. In particular,
processValue -> lookupValue and processType -> convertType
now fail if the translation fails (instead of returning an error),
which simplifies the error handling.

The revision prepares a follow up commit that will import
LLVMIR intrinsics using tablegen.

Reviewed By: ftynse

Differential Revision: https://reviews.llvm.org/D135349
mlir/lib/Target/LLVMIR/ConvertFromLLVMIR.cpp