summaryrefslogtreecommitdiff
path: root/lib
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
commite07b75e069969558c3fbb2f5bfb9a652f6ea1d6b (patch)
tree082ace8cf4a6c1bb02afbf7a6532370b7d6bef71 /lib
parentbea77bb6e82e7f7feae71b2cafea4f6a9f6098c0 (diff)
downloadllvm-e07b75e069969558c3fbb2f5bfb9a652f6ea1d6b.tar.gz
llvm-e07b75e069969558c3fbb2f5bfb9a652f6ea1d6b.tar.bz2
llvm-e07b75e069969558c3fbb2f5bfb9a652f6ea1d6b.tar.xz
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
Diffstat (limited to 'lib')
-rw-r--r--lib/MC/MCAsmInfo.cpp1
-rw-r--r--lib/MC/MCAsmStreamer.cpp2
2 files changed, 2 insertions, 1 deletions
diff --git a/lib/MC/MCAsmInfo.cpp b/lib/MC/MCAsmInfo.cpp
index 670b2e9b29..e8902e75b0 100644
--- a/lib/MC/MCAsmInfo.cpp
+++ b/lib/MC/MCAsmInfo.cpp
@@ -28,6 +28,7 @@ MCAsmInfo::MCAsmInfo() {
SeparatorChar = ';';
CommentColumn = 40;
CommentString = "#";
+ LabelSuffix = ":";
GlobalPrefix = "";
PrivateGlobalPrefix = ".";
LinkerPrivateGlobalPrefix = "";
diff --git a/lib/MC/MCAsmStreamer.cpp b/lib/MC/MCAsmStreamer.cpp
index 8442de3f29..1402f8eb18 100644
--- a/lib/MC/MCAsmStreamer.cpp
+++ b/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);
}