diff options
author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2014-12-04 00:06:57 +0000 |
---|---|---|
committer | Matt Arsenault <Matthew.Arsenault@amd.com> | 2014-12-04 00:06:57 +0000 |
commit | 4e27343eec284d9028617171a82a5816420fe4c7 (patch) | |
tree | e1f2a4622f68ba63debb758e0c30e372caecc196 /llvm/lib/CodeGen/MachineBasicBlock.cpp | |
parent | a7eb3cb46e83a6c275cd212c95497627e157aa98 (diff) | |
download | bcm5719-llvm-4e27343eec284d9028617171a82a5816420fe4c7.tar.gz bcm5719-llvm-4e27343eec284d9028617171a82a5816420fe4c7.zip |
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 &.
llvm-svn: 223323
Diffstat (limited to 'llvm/lib/CodeGen/MachineBasicBlock.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineBasicBlock.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/MachineBasicBlock.cpp b/llvm/lib/CodeGen/MachineBasicBlock.cpp index 3058b1a4b9b..36ae30940fa 100644 --- a/llvm/lib/CodeGen/MachineBasicBlock.cpp +++ b/llvm/lib/CodeGen/MachineBasicBlock.cpp @@ -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())); |