@@ -30,35 +30,24 @@ class TestTargetDataLayout : public ::testing::Test {
3030};
3131
3232// Test that verifies the target data layout string representation
33- // is consistent with the CPU architecture. This test is portable
34- // across different architectures.
33+ // is populated.
3534TEST_F (TestTargetDataLayout, VerifyDataLayoutForArchitecture) {
36- // Create an LLVM generator with default configuration
3735 ASSERT_OK_AND_ASSIGN (auto generator, LLVMGenerator::Make (TestConfiguration (), false ));
3836
39- // Get the module from the generator
4037 llvm::Module* module = generator->module ();
4138 ASSERT_NE (module , nullptr );
4239
43- // Get the data layout from the module
4440 const llvm::DataLayout& data_layout = module ->getDataLayout ();
4541 std::string data_layout_str = data_layout.getStringRepresentation ();
4642
47- // Verify that the data layout string is not empty
4843 EXPECT_FALSE (data_layout_str.empty ());
4944
50- // Get the host CPU architecture information
5145 std::string host_cpu = llvm::sys::getHostCPUName ().str ();
5246 std::string triple = llvm::sys::getDefaultTargetTriple ();
53-
5447 // Log the information for debugging
5548 std::cout << " Host CPU: " << host_cpu << std::endl;
5649 std::cout << " Target Triple: " << triple << std::endl;
5750 std::cout << " Data Layout: " << data_layout_str << std::endl;
58-
59- // Verify that the data layout string is not empty
60- EXPECT_FALSE (data_layout_str.empty ());
61-
6251 }
6352} // namespace gandiva
6453
0 commit comments