wirte up .file and .file to the mc asmparser.
llvm-svn: 94438
This commit is contained in:
parent
601ef33c77
commit
d45adf28de
|
@ -1708,14 +1708,18 @@ bool AsmParser::ParseDirectiveFile(StringRef, SMLoc DirectiveLoc) {
|
|||
if (Lexer.isNot(AsmToken::String))
|
||||
return TokError("unexpected token in '.file' directive");
|
||||
|
||||
StringRef ATTRIBUTE_UNUSED FileName = getTok().getString();
|
||||
StringRef Filename = getTok().getString();
|
||||
Filename = Filename.substr(1, Filename.size()-2);
|
||||
Lex();
|
||||
|
||||
if (Lexer.isNot(AsmToken::EndOfStatement))
|
||||
return TokError("unexpected token in '.file' directive");
|
||||
|
||||
// FIXME: Do something with the .file.
|
||||
|
||||
if (FileNumber == -1)
|
||||
Out.EmitFileDirective(Filename);
|
||||
else
|
||||
Out.EmitDwarfFileDirective(FileNumber, Filename);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
# RUN: llvm-mc -triple i386-unknown-unknown %s
|
||||
# FIXME: Actually test the output.
|
||||
# RUN: llvm-mc -triple i386-unknown-unknown %s | FileCheck %s
|
||||
|
||||
.file "hello"
|
||||
.file 1 "world"
|
||||
|
||||
# CHECK: .file "hello"
|
||||
# CHECK: .file 1 "world"
|
||||
|
||||
|
|
Loading…
Reference in New Issue