Skip to content

Commit 9088152

Browse files
committed
LLVM 3.7: Explicit string conversion required for DataLayout.
1 parent ed6e0a4 commit 9088152

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

gen/module.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,11 @@ llvm::Module* Module::genLLVMModule(llvm::LLVMContext& context)
653653

654654
// set final data layout
655655
ir.module->setDataLayout(gDataLayout->getStringRepresentation());
656+
#if LDC_LLVM_VER >= 307
657+
IF_LOG Logger::cout() << "Final data layout: " << ir.module->getDataLayout().getStringRepresentation() << '\n';
658+
#else
656659
IF_LOG Logger::cout() << "Final data layout: " << ir.module->getDataLayout() << '\n';
660+
#endif
657661

658662
// handle invalid 'objectø module
659663
if (!ClassDeclaration::object) {

0 commit comments

Comments
 (0)