mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-24 22:24:54 +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:
@@ -248,6 +248,9 @@ namespace llvm {
|
|||||||
/// @verbatim (Eg. '\t') @endverbatim
|
/// @verbatim (Eg. '\t') @endverbatim
|
||||||
void EmitString(const std::string &String) const;
|
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
|
/// 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
|
// EmitAlignment - Emit an alignment directive to the specified power of
|
||||||
|
Reference in New Issue
Block a user