aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineModuleInfo.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2019-08-09 20:18:30 +0000
committerBill Wendling <isanbard@gmail.com>2019-08-09 20:18:30 +0000
commit79176a2542d03107b90613c84f18ccba41ad8fa8 (patch)
tree59549b071f8e5754906a80005bc24c399c05799a /llvm/lib/CodeGen/MachineModuleInfo.cpp
parent1b104388752f66191c867380efde7bbf1f13ca80 (diff)
downloadllvm-79176a2542d03107b90613c84f18ccba41ad8fa8.zip
llvm-79176a2542d03107b90613c84f18ccba41ad8fa8.tar.gz
llvm-79176a2542d03107b90613c84f18ccba41ad8fa8.tar.bz2
[CodeGen] Require a name for a block addr target
Summary: A block address may be used in inline assembly. In which case it requires a name so that the asm parser has something to parse. Creating a name for every block address is a large hammer, but is necessary because at the point when a temp symbol is created we don't necessarily know if it's used in inline asm. This ensures that it exists regardless. Reviewers: nickdesaulniers, craig.topper Subscribers: nathanchance, javed.absar, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D65352 llvm-svn: 368478
Diffstat (limited to 'llvm/lib/CodeGen/MachineModuleInfo.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineModuleInfo.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MachineModuleInfo.cpp b/llvm/lib/CodeGen/MachineModuleInfo.cpp
index 6ac9d3d..3dca5a6 100644
--- a/llvm/lib/CodeGen/MachineModuleInfo.cpp
+++ b/llvm/lib/CodeGen/MachineModuleInfo.cpp
@@ -121,7 +121,7 @@ ArrayRef<MCSymbol *> MMIAddrLabelMap::getAddrLabelSymbolToEmit(BasicBlock *BB) {
BBCallbacks.back().setMap(this);
Entry.Index = BBCallbacks.size() - 1;
Entry.Fn = BB->getParent();
- Entry.Symbols.push_back(Context.createTempSymbol());
+ Entry.Symbols.push_back(Context.createTempSymbol(!BB->hasAddressTaken()));
return Entry.Symbols;
}