aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/CodeGen
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-03-15 20:39:00 +0000
committerChris Lattner <sabre@nondot.org>2010-03-15 20:39:00 +0000
commitf6853ffef510c3c0217e7e3c98969d82b56585ed (patch)
treeaa37edad2cd662e312e33b4a6be5c2eef99b14e1 /include/llvm/CodeGen
parentd8a8cb416970cbaf9dd96d5ad1ced68acacd1f0d (diff)
downloadexternal_llvm-f6853ffef510c3c0217e7e3c98969d82b56585ed.zip
external_llvm-f6853ffef510c3c0217e7e3c98969d82b56585ed.tar.gz
external_llvm-f6853ffef510c3c0217e7e3c98969d82b56585ed.tar.bz2
Implement support for the case when a reference to a addr-of-bb
label is generated, but then the block is deleted. Since the value is undefined, we just emit the label right after the entry label of the function. It might matter that the label is in the same section as the function was afterall. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98579 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen')
-rw-r--r--include/llvm/CodeGen/MachineModuleInfo.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/MachineModuleInfo.h b/include/llvm/CodeGen/MachineModuleInfo.h
index accc62e..7582017 100644
--- a/include/llvm/CodeGen/MachineModuleInfo.h
+++ b/include/llvm/CodeGen/MachineModuleInfo.h
@@ -214,6 +214,14 @@ public:
/// block when its address is taken. This cannot be its normal LBB label
/// because the block may be accessed outside its containing function.
MCSymbol *getAddrLabelSymbol(const BasicBlock *BB);
+
+ /// takeDeletedSymbolsForFunction - If the specified function has had any
+ /// references to address-taken blocks generated, but the block got deleted,
+ /// return the symbol now so we can emit it. This prevents emitting a
+ /// reference to a symbol that has no definition.
+ void takeDeletedSymbolsForFunction(const Function *F,
+ std::vector<MCSymbol*> &Result);
+
//===- EH ---------------------------------------------------------------===//