summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorNick Desaulniers <ndesaulniers@google.com>2019-07-19 18:18:02 +0000
committerNick Desaulniers <ndesaulniers@google.com>2019-07-19 18:18:02 +0000
commit4e9196ebcb9d9bc715308b89f22499efd822da73 (patch)
treef203ff39b2463dbbcba5ef4b70289554b1fb7de2 /llvm/lib/CodeGen
parent2272be94f2206da54d6d4803cf79275816376c3f (diff)
downloadbcm5719-llvm-4e9196ebcb9d9bc715308b89f22499efd822da73.tar.gz
bcm5719-llvm-4e9196ebcb9d9bc715308b89f22499efd822da73.zip
Revert "Use the MachineBasicBlock symbol for a callbr target"
This reverts commit r366523/ccbffefccaff42b0d094c9ef0f49fc3e8c8456ea. Two regressions were immediately reported: - https://github.com/ClangBuiltLinux/linux/issues/614 - https://github.com/ClangBuiltLinux/linux/issues/615 Reported-by: nathanchance llvm-svn: 366600
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
index 59d3b7c8e55..7721e996aca 100644
--- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
@@ -430,13 +430,8 @@ static void EmitGCCInlineAsmStr(const char *AsmStr, const MachineInstr *MI,
if (Modifier[0] == 'l') { // Labels are target independent.
if (MI->getOperand(OpNo).isBlockAddress()) {
const BlockAddress *BA = MI->getOperand(OpNo).getBlockAddress();
- const BasicBlock *BB = BA->getBasicBlock();
- const MachineFunction *MF = MI->getParent()->getParent();
- for (const MachineBasicBlock &MBB : *MF)
- if (BB == MBB.getBasicBlock()) {
- MBB.getSymbol()->print(OS, AP->MAI);
- break;
- }
+ MCSymbol *Sym = AP->GetBlockAddressSymbol(BA);
+ Sym->print(OS, AP->MAI);
} else if (MI->getOperand(OpNo).isMBB()) {
const MCSymbol *Sym = MI->getOperand(OpNo).getMBB()->getSymbol();
Sym->print(OS, AP->MAI);
OpenPOWER on IntegriCloud