mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-20 00:20:11 +00:00
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:
@@ -54,9 +54,7 @@ MCSymbol *MachineBasicBlock::getSymbol() const {
|
||||
if (!CachedMCSymbol) {
|
||||
const MachineFunction *MF = getParent();
|
||||
MCContext &Ctx = MF->getContext();
|
||||
const TargetMachine &TM = MF->getTarget();
|
||||
const char *Prefix =
|
||||
TM.getSubtargetImpl()->getDataLayout()->getPrivateGlobalPrefix();
|
||||
const char *Prefix = Ctx.getAsmInfo()->getPrivateLabelPrefix();
|
||||
CachedMCSymbol = Ctx.GetOrCreateSymbol(Twine(Prefix) + "BB" +
|
||||
Twine(MF->getFunctionNumber()) +
|
||||
"_" + Twine(getNumber()));
|
||||
|
||||
Reference in New Issue
Block a user