From ce56ae8afe1fd00cc137375332014b8d8a8ef960 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Wed, 2 Oct 2019 13:05:10 -0400 Subject: [PATCH] we have to use c++14 now for llvm10 --- CMakeLists.txt | 2 +- src/zig_llvm.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a189a082d3..8f07f33053 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -498,7 +498,7 @@ include_directories( ) # These have to go before the -Wno- flags -set(EXE_CFLAGS "-std=c++11") +set(EXE_CFLAGS "-std=c++14") if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug") if(MSVC) set(EXE_CFLAGS "${EXE_CFLAGS} /w") diff --git a/src/zig_llvm.cpp b/src/zig_llvm.cpp index 8166173051..4047d906d9 100644 --- a/src/zig_llvm.cpp +++ b/src/zig_llvm.cpp @@ -150,7 +150,7 @@ LLVMTargetMachineRef ZigLLVMCreateTargetMachine(LLVMTargetRef T, const char *Tri } unsigned ZigLLVMDataLayoutGetStackAlignment(LLVMTargetDataRef TD) { - return unwrap(TD)->getStackAlignment(); + return unwrap(TD)->getStackAlignment().value(); } bool ZigLLVMTargetMachineEmitToFile(LLVMTargetMachineRef targ_machine_ref, LLVMModuleRef module_ref,