[Mlir-commits] [mlir] 5e30c74 - [mlir] Use the process (host) triple in MLIRTargetLLVMTests (#69538)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Wed Oct 18 18:48:28 PDT 2023


Author: Stella Stamenova
Date: 2023-10-18T18:48:24-07:00
New Revision: 5e30c74309c36984db3eea29f6c9c4ecec38de38

URL: https://github.com/llvm/llvm-project/commit/5e30c74309c36984db3eea29f6c9c4ecec38de38
DIFF: https://github.com/llvm/llvm-project/commit/5e30c74309c36984db3eea29f6c9c4ecec38de38.diff

LOG: [mlir] Use the process (host) triple in MLIRTargetLLVMTests (#69538)

The test is meant to execute on the native target and only initializes
the native target. However, it then gets the default target triple
instead of the process (host) triple. This fails in cases where the
native target and the default target are not the same.

The test was added here: https://reviews.llvm.org/D154100

Added: 
    

Modified: 
    mlir/unittests/Target/LLVM/SerializeToLLVMBitcode.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/unittests/Target/LLVM/SerializeToLLVMBitcode.cpp b/mlir/unittests/Target/LLVM/SerializeToLLVMBitcode.cpp
index c23ed7efd72fdf4..69c9d9b2f320202 100644
--- a/mlir/unittests/Target/LLVM/SerializeToLLVMBitcode.cpp
+++ b/mlir/unittests/Target/LLVM/SerializeToLLVMBitcode.cpp
@@ -55,7 +55,7 @@ TEST_F(MLIRTargetLLVM, SKIP_WITHOUT_NATIVE(SerializeToLLVMBitcode)) {
   ASSERT_TRUE(!!module);
 
   // Serialize the module.
-  std::string targetTriple = llvm::sys::getDefaultTargetTriple();
+  std::string targetTriple = llvm::sys::getProcessTriple();
   LLVM::ModuleToObject serializer(*(module->getOperation()), targetTriple, "",
                                   "");
   std::optional<SmallVector<char, 0>> serializedModule = serializer.run();


        


More information about the Mlir-commits mailing list