mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-19 19:31:50 +00:00
wirte up .file and .file to the mc asmparser.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94438 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a6594fc715
commit
d32e803073
@ -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…
x
Reference in New Issue
Block a user