diff options
author | Chris Lattner <sabre@nondot.org> | 2010-03-15 20:39:00 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-03-15 20:39:00 +0000 |
commit | 9cc0da9c29302e9463a6f31ba705c8e1b6f4cea1 (patch) | |
tree | aa37edad2cd662e312e33b4a6be5c2eef99b14e1 /include/llvm/CodeGen/MachineModuleInfo.h | |
parent | 034721eb6a1787b3d5ebf760de067cb622555bae (diff) |
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/MachineModuleInfo.h')
-rw-r--r-- | include/llvm/CodeGen/MachineModuleInfo.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/MachineModuleInfo.h b/include/llvm/CodeGen/MachineModuleInfo.h index accc62eb6c..7582017a0f 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 ---------------------------------------------------------------===// |