Allow target to specify prefix for labels

Use the MCAsmInfo instead of the DataLayout, and allow
specifying a custom prefix for labels specifically. HSAIL
requires that labels begin with @, but global symbols with &.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223323 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Matt Arsenault
2014-12-04 00:06:57 +00:00
parent 5862c2af3e
commit 459e595697
10 changed files with 18 additions and 4 deletions

View File

@@ -4662,7 +4662,7 @@ bool AsmParser::parseMSInlineAsm(
OS << "$$";
break;
case AOK_Label:
OS << Ctx.getAsmInfo()->getPrivateGlobalPrefix() << AR.Label;
OS << Ctx.getAsmInfo()->getPrivateLabelPrefix() << AR.Label;
break;
case AOK_Input:
OS << '$' << InputIdx++;