mirror of
https://github.com/RPCSX/llvm.git
synced 2025-01-27 07:12:06 +00:00
allow target-specific label suffixes, patch by Yuri Gribov!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114592 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
bea77bb6e8
commit
e07b75e069
@ -72,6 +72,9 @@ namespace llvm {
|
||||
/// assembler.
|
||||
const char *CommentString; // Defaults to "#"
|
||||
|
||||
/// LabelSuffix - This is appended to emitted labels.
|
||||
const char *LabelSuffix; // Defaults to ":"
|
||||
|
||||
/// GlobalPrefix - If this is set to a non-empty string, it is prepended
|
||||
/// onto all global symbols. This is often used for "_" or ".".
|
||||
const char *GlobalPrefix; // Defaults to ""
|
||||
@ -334,6 +337,9 @@ namespace llvm {
|
||||
const char *getCommentString() const {
|
||||
return CommentString;
|
||||
}
|
||||
const char *getLabelSuffix() const {
|
||||
return LabelSuffix;
|
||||
}
|
||||
const char *getGlobalPrefix() const {
|
||||
return GlobalPrefix;
|
||||
}
|
||||
|
@ -28,6 +28,7 @@ MCAsmInfo::MCAsmInfo() {
|
||||
SeparatorChar = ';';
|
||||
CommentColumn = 40;
|
||||
CommentString = "#";
|
||||
LabelSuffix = ":";
|
||||
GlobalPrefix = "";
|
||||
PrivateGlobalPrefix = ".";
|
||||
LinkerPrivateGlobalPrefix = "";
|
||||
|
@ -236,7 +236,7 @@ void MCAsmStreamer::EmitLabel(MCSymbol *Symbol) {
|
||||
assert(!Symbol->isVariable() && "Cannot emit a variable symbol!");
|
||||
assert(CurSection && "Cannot emit before setting section!");
|
||||
|
||||
OS << *Symbol << ":";
|
||||
OS << *Symbol << MAI.getLabelSuffix();
|
||||
EmitEOL();
|
||||
Symbol->setSection(*CurSection);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user