Convert MC command line option for fatal assembler warnings into a

proper flag.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216471 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Joerg Sonnenberger
2014-08-26 18:39:50 +00:00
parent de2d08ea17
commit a5718c69b4
4 changed files with 9 additions and 9 deletions

View File

@@ -45,10 +45,6 @@
#include <vector>
using namespace llvm;
static cl::opt<bool>
FatalAssemblerWarnings("fatal-assembler-warnings",
cl::desc("Consider warnings as error"));
MCAsmParserSemaCallback::~MCAsmParserSemaCallback() {}
namespace {
@@ -552,7 +548,7 @@ void AsmParser::Note(SMLoc L, const Twine &Msg, ArrayRef<SMRange> Ranges) {
}
bool AsmParser::Warning(SMLoc L, const Twine &Msg, ArrayRef<SMRange> Ranges) {
if (FatalAssemblerWarnings)
if (getTargetParser().getTargetOptions().MCFatalWarnings)
return Error(L, Msg, Ranges);
printMessage(L, SourceMgr::DK_Warning, Msg, Ranges);
printMacroInstantiations();