diff --git a/source/backend/llvm/linker.cpp b/source/backend/llvm/linker.cpp index c182bf42..87b29938 100644 --- a/source/backend/llvm/linker.cpp +++ b/source/backend/llvm/linker.cpp @@ -211,7 +211,9 @@ namespace backend if(frontend::getOutputMode() == ProgOutputMode::RunJit) { - const char* argv = ("llvm-jit-" + this->linkedModule->getModuleIdentifier()).c_str(); + std::string modname = ("llvm-jit-" + this->linkedModule->getModuleIdentifier()); + const char* argv = modname.c_str(); + auto entry = this->getEntryFunctionFromJIT(); _printTiming(ts, "llvm jit"); diff --git a/source/backend/llvm/translator.cpp b/source/backend/llvm/translator.cpp index 9e91e805..fd7e0b2b 100644 --- a/source/backend/llvm/translator.cpp +++ b/source/backend/llvm/translator.cpp @@ -489,7 +489,7 @@ namespace backend ty = fir::Type::getString(); // add -1 for the capacity and 0 for the refcountptr. - mems.push_back(llvm::ConstantInt::get(getNativeWordTy(), -1)); + mems.push_back(llvm::ConstantInt::get(getNativeWordTy(), static_cast(-1))); mems.push_back(zconst); } diff --git a/source/include/zpr.h b/source/include/zpr.h index 5dbd81c7..5b362c07 100644 --- a/source/include/zpr.h +++ b/source/include/zpr.h @@ -9,6 +9,7 @@ #include #include +#include #include #include @@ -404,7 +405,6 @@ namespace zpr char buf[65] = {0}; size_t digits_len = 0; - const char* fmt_str = 0; auto spec = args.specifier; static std::map len_specs = { @@ -417,8 +417,9 @@ namespace zpr { format_args::LENGTH_PTRDIFF_T, "t" } }; - fmt_str = ("%" + len_specs[args.length] + spec).c_str(); - digits_len = snprintf(&buf[0], 64, fmt_str, x); + auto fmt_str = ("%" + len_specs[args.length] + spec); + + digits_len = snprintf(&buf[0], 64, fmt_str.c_str(), x); // sadly, we must cheat here as well, because osx doesn't bloody have charconv (STILL)?