mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-13 09:33:50 +00:00
Add a routine for emitting .file directives, for setting up
file numbers to use with .loc directives. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42272 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b42abebe36
commit
189f80dc25
@ -248,6 +248,9 @@ namespace llvm {
|
||||
/// @verbatim (Eg. '\t') @endverbatim
|
||||
void EmitString(const std::string &String) const;
|
||||
|
||||
/// EmitFile - Emit a .file directive.
|
||||
void EmitFile(unsigned Number, const std::string &Name) const;
|
||||
|
||||
//===------------------------------------------------------------------===//
|
||||
|
||||
/// EmitAlignment - Emit an alignment directive to the specified power of
|
||||
|
@ -618,6 +618,17 @@ void AsmPrinter::EmitString(const std::string &String) const {
|
||||
}
|
||||
|
||||
|
||||
/// EmitFile - Emit a .file directive.
|
||||
void AsmPrinter::EmitFile(unsigned Number, const std::string &Name) const {
|
||||
O << "\t.file\t" << Number << " \"";
|
||||
for (unsigned i = 0, N = Name.size(); i < N; ++i) {
|
||||
unsigned char C = Name[i];
|
||||
printStringChar(O, C);
|
||||
}
|
||||
O << "\"";
|
||||
}
|
||||
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
// EmitAlignment - Emit an alignment directive to the specified power of
|
||||
|
Loading…
x
Reference in New Issue
Block a user