From 038855e4a024a07868c4a04ab310181cfa947c13 Mon Sep 17 00:00:00 2001 From: Kai Nacke Date: Thu, 12 Dec 2013 20:02:45 +0100 Subject: [PATCH] Deprecate -noruntime switch (which has now no function). --- gen/runtime.cpp | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/gen/runtime.cpp b/gen/runtime.cpp index a8d98726..d7f99b82 100644 --- a/gen/runtime.cpp +++ b/gen/runtime.cpp @@ -43,7 +43,7 @@ using namespace llvm::Attribute; ////////////////////////////////////////////////////////////////////////////////////////////////// static llvm::cl::opt noruntime("noruntime", - llvm::cl::desc("Do not allow code that generates implicit runtime calls"), + llvm::cl::desc("Deprecated. Please use -nogc instead."), llvm::cl::ZeroOrMore); static llvm::cl::opt nogc("nogc", @@ -112,7 +112,11 @@ bool LLVM_D_InitRuntime() LOG_SCOPE; if (!M) + { + if (noruntime) + deprecation(Loc(), "-noruntime has no function and will be removed in 0.14.0. Please use -nogc instead."); LLVM_D_BuildRuntimeModule(); + } return true; } @@ -130,10 +134,6 @@ void LLVM_D_FreeRuntime() llvm::Function* LLVM_D_GetRuntimeFunction(llvm::Module* target, const char* name) { - if (noruntime) { - error("No implicit runtime calls (%s) allowed with -noruntime option enabled", name); - fatal(); - } checkForImplicitGCCall(name); if (!M) { @@ -163,10 +163,6 @@ llvm::GlobalVariable* LLVM_D_GetRuntimeGlobal(llvm::Module* target, const char* return gv; } - if (noruntime) { - error("No implicit runtime calls (%s) allowed with -noruntime option enabled", name); - fatal(); - } checkForImplicitGCCall(name); if (!M) {