llvm-project/llvm/lib/CodeGen/AsmPrinter
Pete Cooper adebb9379a Remove llvm::getDISubprogram in favor of Function::getSubprogram
llvm::getDISubprogram walks the instructions in a function, looking for one in the scope of the current function, so that it can find the !dbg entry for the subprogram itself.

Now that !dbg is attached to functions, this should not be necessary. This patch changes all uses to just query the subprogram directly on the function.

Ideally this should be NFC, but in reality its possible that a function:

has no !dbg (in which case there's likely a bug somewhere in an opt pass), or
that none of the instructions had a scope referencing the function, so we used to not find the !dbg on the function but now we will

Reviewed by Duncan Exon Smith.

Differential Revision: http://reviews.llvm.org/D18074

llvm-svn: 263184
2016-03-11 02:14:16 +00:00
..
ARMException.cpp [EH] Handle non-Function personalities like unknown personalities 2015-08-31 20:02:16 +00:00
AddressPool.cpp MC: Clean up MCExpr naming. NFC. 2015-05-30 01:25:56 +00:00
AddressPool.h One more batch of self-containing headers. 2016-01-27 19:29:56 +00:00
AsmPrinter.cpp WIP: CodeGen: Use MachineInstr& in MachineInstrBundle.h, NFC 2016-02-27 17:05:33 +00:00
AsmPrinterDwarf.cpp Generalize ownership/passing semantics to allow dsymutil to own abbreviations via unique_ptr 2015-11-18 00:34:10 +00:00
AsmPrinterHandler.h Extract the method to begin and end a fragment in AsmPrinterHandler in their own method. NFC 2016-02-26 20:30:37 +00:00
AsmPrinterInlineAsm.cpp Enable the %s modifier in inline asm template string 2016-02-04 16:18:08 +00:00
ByteStreamer.h -Wdeprecated-clean: Fix cases of violating the rule of 5 in ways that are deprecated in C++11 2015-08-03 20:12:58 +00:00
CMakeLists.txt [codeview] Describe int local variables using .cv_def_range 2016-02-10 20:55:49 +00:00
CodeViewDebug.cpp Remove llvm::getDISubprogram in favor of Function::getSubprogram 2016-03-11 02:14:16 +00:00
CodeViewDebug.h [codeview] Describe local variables in registers 2016-02-12 21:48:30 +00:00
DIE.cpp DwarfDebug: emit type units immediately. 2016-02-11 19:57:46 +00:00
DIEHash.cpp DwarfDebug: emit type units immediately. 2016-02-11 19:57:46 +00:00
DIEHash.h [AsmPrinter] Prune dead code. NFC. 2015-10-15 17:16:32 +00:00
DbgValueHistoryCalculator.cpp CodeGen: Change MachineInstr to use MachineInstr&, NFC 2016-02-27 20:01:33 +00:00
DbgValueHistoryCalculator.h One more batch of self-containing headers. 2016-01-27 19:29:56 +00:00
DebugHandlerBase.cpp [codeview] Describe int local variables using .cv_def_range 2016-02-10 20:55:49 +00:00
DebugHandlerBase.h Make header self-contained. NFC. 2016-02-18 18:02:48 +00:00
DebugLocEntry.h Make headers self-contained again. 2016-03-04 10:49:30 +00:00
DebugLocStream.cpp AsmPrinter: Don't emit empty .debug_loc entries 2015-06-21 16:54:56 +00:00
DebugLocStream.h AsmPrinter: Don't emit empty .debug_loc entries 2015-06-21 16:54:56 +00:00
DwarfAccelTable.cpp Fix some Clang-tidy modernize warnings, other minor fixes. 2015-11-04 22:32:32 +00:00
DwarfAccelTable.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
DwarfCFIException.cpp Fix warning in DwarfCFIException. NFC 2016-02-26 20:49:07 +00:00
DwarfCompileUnit.cpp Revert r261633 "Supporting all entities declared in lexical scope in LLVM debug info." 2016-02-23 19:17:03 +00:00
DwarfCompileUnit.h Revert r261633 "Supporting all entities declared in lexical scope in LLVM debug info." 2016-02-23 19:17:03 +00:00
DwarfDebug.cpp Improve the debug output of DwarfDebug::buildLocationList(). 2016-02-29 22:28:22 +00:00
DwarfDebug.h Revert r261633 "Supporting all entities declared in lexical scope in LLVM debug info." 2016-02-23 19:17:03 +00:00
DwarfException.h Extract the method to begin and end a fragment in AsmPrinterHandler in their own method. NFC 2016-02-26 20:30:37 +00:00
DwarfExpression.cpp Fix debug info with SafeStack. 2015-09-30 19:55:43 +00:00
DwarfExpression.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
DwarfFile.cpp DwarfDebug: emit type units immediately. 2016-02-11 19:57:46 +00:00
DwarfFile.h DwarfDebug: emit type units immediately. 2016-02-11 19:57:46 +00:00
DwarfStringPool.cpp AsmPrinter: Avoid creating symbols in DwarfStringPool 2015-05-24 16:58:59 +00:00
DwarfStringPool.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
DwarfUnit.cpp Revert r261633 "Supporting all entities declared in lexical scope in LLVM debug info." 2016-02-23 19:17:03 +00:00
DwarfUnit.h Revert r261633 "Supporting all entities declared in lexical scope in LLVM debug info." 2016-02-23 19:17:03 +00:00
EHStreamer.cpp Use make_range(rbegin(), rend()) to allow foreach loops. NFC. 2015-07-24 21:13:43 +00:00
EHStreamer.h Extract the method to begin and end a fragment in AsmPrinterHandler in their own method. NFC 2016-02-26 20:30:37 +00:00
ErlangGCPrinter.cpp Move most user of TargetMachine::getDataLayout to the Module one 2015-07-16 06:11:10 +00:00
LLVMBuild.txt Reland "[CodeView] Use assembler directives for line tables" 2016-01-29 00:49:42 +00:00
OcamlGCPrinter.cpp Move most user of TargetMachine::getDataLayout to the Module one 2015-07-16 06:11:10 +00:00
WinException.cpp [WinEH] Allocate the registration node before the catch objects 2016-03-01 04:30:16 +00:00
WinException.h [WinEH] Move WinEHFuncInfo from MachineModuleInfo to MachineFunction 2015-11-17 21:10:25 +00:00