summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-09-22 22:19:53 +0000
committerChris Lattner <sabre@nondot.org>2010-09-22 22:19:53 +0000
commit7bce0596a78526d1c02f231f8863b44f6f5a6c69 (patch)
tree9782815aef27e279026d87b841ca71da59a0ca83 /llvm/lib/MC
parent71954b8d5462902b15684a402ac75d1cc31c5b55 (diff)
downloadbcm5719-llvm-7bce0596a78526d1c02f231f8863b44f6f5a6c69.tar.gz
bcm5719-llvm-7bce0596a78526d1c02f231f8863b44f6f5a6c69.zip
allow target-specific label suffixes, patch by Yuri Gribov!
llvm-svn: 114592
Diffstat (limited to 'llvm/lib/MC')
-rw-r--r--llvm/lib/MC/MCAsmInfo.cpp1
-rw-r--r--llvm/lib/MC/MCAsmStreamer.cpp2
2 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/MC/MCAsmInfo.cpp b/llvm/lib/MC/MCAsmInfo.cpp
index 670b2e9b292..e8902e75b06 100644
--- a/llvm/lib/MC/MCAsmInfo.cpp
+++ b/llvm/lib/MC/MCAsmInfo.cpp
@@ -28,6 +28,7 @@ MCAsmInfo::MCAsmInfo() {
SeparatorChar = ';';
CommentColumn = 40;
CommentString = "#";
+ LabelSuffix = ":";
GlobalPrefix = "";
PrivateGlobalPrefix = ".";
LinkerPrivateGlobalPrefix = "";
diff --git a/llvm/lib/MC/MCAsmStreamer.cpp b/llvm/lib/MC/MCAsmStreamer.cpp
index 8442de3f299..1402f8eb180 100644
--- a/llvm/lib/MC/MCAsmStreamer.cpp
+++ b/llvm/lib/MC/MCAsmStreamer.cpp
@@ -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);
}
OpenPOWER on IntegriCloud