mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 04:30:23 +00:00
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:
parent
de2d08ea17
commit
a5718c69b4
@ -114,6 +114,8 @@ public:
|
||||
bool isParsingInlineAsm () { return ParsingInlineAsm; }
|
||||
void setParsingInlineAsm (bool Value) { ParsingInlineAsm = Value; }
|
||||
|
||||
MCTargetOptions getTargetOptions() const { return MCOptions; }
|
||||
|
||||
void setSemaCallback(MCAsmParserSemaCallback *Callback) {
|
||||
SemaCallback = Callback;
|
||||
}
|
||||
|
@ -24,6 +24,7 @@ public:
|
||||
|
||||
bool MCRelaxAll : 1;
|
||||
bool MCNoExecStack : 1;
|
||||
bool MCFatalWarnings : 1;
|
||||
bool MCSaveTempLabels : 1;
|
||||
bool MCUseDwarfDirectory : 1;
|
||||
bool ShowMCEncoding : 1;
|
||||
@ -38,12 +39,13 @@ inline bool operator==(const MCTargetOptions &LHS, const MCTargetOptions &RHS) {
|
||||
return (ARE_EQUAL(SanitizeAddress) &&
|
||||
ARE_EQUAL(MCRelaxAll) &&
|
||||
ARE_EQUAL(MCNoExecStack) &&
|
||||
ARE_EQUAL(MCFatalWarnings) &&
|
||||
ARE_EQUAL(MCSaveTempLabels) &&
|
||||
ARE_EQUAL(MCUseDwarfDirectory) &&
|
||||
ARE_EQUAL(ShowMCEncoding) &&
|
||||
ARE_EQUAL(ShowMCInst) &&
|
||||
ARE_EQUAL(AsmVerbose) &&
|
||||
ARE_EQUAL(DwarfVersion));
|
||||
ARE_EQUAL(DwarfVersion));
|
||||
#undef ARE_EQUAL
|
||||
}
|
||||
|
||||
|
@ -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();
|
||||
|
@ -13,8 +13,8 @@ namespace llvm {
|
||||
|
||||
MCTargetOptions::MCTargetOptions()
|
||||
: SanitizeAddress(false), MCRelaxAll(false), MCNoExecStack(false),
|
||||
MCSaveTempLabels(false), MCUseDwarfDirectory(false),
|
||||
ShowMCEncoding(false), ShowMCInst(false), AsmVerbose(false),
|
||||
DwarfVersion(0) {}
|
||||
MCFatalWarnings(false), MCSaveTempLabels(false),
|
||||
MCUseDwarfDirectory(false), ShowMCEncoding(false), ShowMCInst(false),
|
||||
AsmVerbose(false), DwarfVersion(0) {}
|
||||
|
||||
} // end namespace llvm
|
||||
|
Loading…
Reference in New Issue
Block a user