diff --git a/driver/main.cpp b/driver/main.cpp index 5aa7f78b51..46c5f1b6e5 100644 --- a/driver/main.cpp +++ b/driver/main.cpp @@ -224,7 +224,13 @@ void initFromPathString(const char *&dest, const cl::opt &src) { dest = nullptr; if (src.getNumOccurrences() != 0) { if (src.empty()) { - error(Loc(), "Expected argument to '-%s'", src.ArgStr); + error(Loc(), "Expected argument to '-%s'", +#if LDC_LLVM_VER >= 308 + src.ArgStr.str().c_str() +#else + src.ArgStr +#endif + ); } dest = dupPathString(src); }