forked from OSchip/llvm-project
parent
37a913ae8f
commit
a7c3273e85
|
@ -46,7 +46,7 @@ static cl::opt<bool>
|
|||
FatalAssemblerWarnings("fatal-assembler-warnings",
|
||||
cl::desc("Consider warnings as error"));
|
||||
|
||||
MCAsmParserSemaCallback::~MCAsmParserSemaCallback() {}
|
||||
MCAsmParserSemaCallback::~MCAsmParserSemaCallback() {}
|
||||
|
||||
namespace {
|
||||
|
||||
|
@ -192,9 +192,9 @@ public:
|
|||
virtual MCAsmLexer &getLexer() { return Lexer; }
|
||||
virtual MCContext &getContext() { return Ctx; }
|
||||
virtual MCStreamer &getStreamer() { return Out; }
|
||||
virtual unsigned getAssemblerDialect() {
|
||||
virtual unsigned getAssemblerDialect() {
|
||||
if (AssemblerDialect == ~0U)
|
||||
return MAI.getAssemblerDialect();
|
||||
return MAI.getAssemblerDialect();
|
||||
else
|
||||
return AssemblerDialect;
|
||||
}
|
||||
|
@ -299,7 +299,8 @@ private:
|
|||
bool ParseDirectiveFill(); // ".fill"
|
||||
bool ParseDirectiveSpace(); // ".space"
|
||||
bool ParseDirectiveZero(); // ".zero"
|
||||
bool ParseDirectiveSet(StringRef IDVal, bool allow_redef); // ".set", ".equ", ".equiv"
|
||||
// ".set", ".equ", ".equiv"
|
||||
bool ParseDirectiveSet(StringRef IDVal, bool allow_redef);
|
||||
bool ParseDirectiveOrg(); // ".org"
|
||||
// ".align{,32}", ".p2align{,w,l}"
|
||||
bool ParseDirectiveAlign(bool IsPow2, unsigned ValueSize);
|
||||
|
@ -1409,7 +1410,7 @@ bool AsmParser::ParseStatement(ParseStatementInfo &Info) {
|
|||
// section is the initial text section then generate a .loc directive for
|
||||
// the instruction.
|
||||
if (!HadError && getContext().getGenDwarfForAssembly() &&
|
||||
getContext().getGenDwarfSection() == getStreamer().getCurrentSection() ) {
|
||||
getContext().getGenDwarfSection() == getStreamer().getCurrentSection()) {
|
||||
|
||||
unsigned Line = SrcMgr.FindLineNumber(IDLoc, CurBuffer);
|
||||
|
||||
|
@ -1421,8 +1422,8 @@ bool AsmParser::ParseStatement(ParseStatementInfo &Info) {
|
|||
if (CppHashFilename.size() != 0) {
|
||||
if(MCDwarfFiles[getContext().getGenDwarfFileNumber()]->getName() !=
|
||||
CppHashFilename)
|
||||
getStreamer().EmitDwarfFileDirective(
|
||||
getContext().nextGenDwarfFileNumber(), StringRef(), CppHashFilename);
|
||||
getStreamer().EmitDwarfFileDirective(
|
||||
getContext().nextGenDwarfFileNumber(), StringRef(), CppHashFilename);
|
||||
|
||||
unsigned CppHashLocLineNo = SrcMgr.FindLineNumber(CppHashLoc,CppHashBuf);
|
||||
Line = CppHashLineNumber - 1 + (Line - CppHashLocLineNo);
|
||||
|
@ -1512,7 +1513,7 @@ void AsmParser::DiagHandler(const SMDiagnostic &Diag, void *Context) {
|
|||
DiagSrcMgr.PrintIncludeStack(ParentIncludeLoc, OS);
|
||||
}
|
||||
|
||||
// If we have not parsed a cpp hash line filename comment or the source
|
||||
// If we have not parsed a cpp hash line filename comment or the source
|
||||
// manager changed or buffer changed (like in a nested include) then just
|
||||
// print the normal diagnostic using its Filename and LineNo.
|
||||
if (!Parser->CppHashLineNumber ||
|
||||
|
@ -1525,7 +1526,7 @@ void AsmParser::DiagHandler(const SMDiagnostic &Diag, void *Context) {
|
|||
return;
|
||||
}
|
||||
|
||||
// Use the CppHashFilename and calculate a line number based on the
|
||||
// Use the CppHashFilename and calculate a line number based on the
|
||||
// CppHashLoc and CppHashLineNumber relative to this Diag's SMLoc for
|
||||
// the diagnostic.
|
||||
const std::string Filename = Parser->CppHashFilename;
|
||||
|
|
Loading…
Reference in New Issue