Test that verifies the target data layout string representation is populated.
| 26 | // Test that verifies the target data layout string representation |
| 27 | // is populated. |
| 28 | TEST(TestTargetDataLayout, VerifyDataLayoutForArchitecture) { |
| 29 | ASSERT_OK_AND_ASSIGN(auto generator, LLVMGenerator::Make(TestConfiguration(), false)); |
| 30 | |
| 31 | llvm::Module* module = generator->module(); |
| 32 | ASSERT_NE(module, nullptr); |
| 33 | |
| 34 | const llvm::DataLayout& data_layout = module->getDataLayout(); |
| 35 | std::string data_layout_str = data_layout.getStringRepresentation(); |
| 36 | |
| 37 | ASSERT_FALSE(data_layout_str.empty()); |
| 38 | } |
| 39 | } // namespace gandiva |