llvm/lib/CodeGen/AsmPrinter
Pete Cooper 1ac3fbac0f 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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@263184 91177308-0d34-0410-b5e6-96231b3b80d8
2016-03-11 02:14:16 +00:00
..
AddressPool.cpp
AddressPool.h
ARMException.cpp
AsmPrinter.cpp WIP: CodeGen: Use MachineInstr& in MachineInstrBundle.h, NFC 2016-02-27 17:05:33 +00:00
AsmPrinterDwarf.cpp
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
ByteStreamer.h
CMakeLists.txt
CodeViewDebug.cpp Remove llvm::getDISubprogram in favor of Function::getSubprogram 2016-03-11 02:14:16 +00:00
CodeViewDebug.h
DbgValueHistoryCalculator.cpp CodeGen: Change MachineInstr to use MachineInstr&, NFC 2016-02-27 20:01:33 +00:00
DbgValueHistoryCalculator.h
DebugHandlerBase.cpp
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
DebugLocStream.h
DIE.cpp
DIEHash.cpp
DIEHash.h
DwarfAccelTable.cpp
DwarfAccelTable.h
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
DwarfExpression.h
DwarfFile.cpp
DwarfFile.h
DwarfStringPool.cpp
DwarfStringPool.h
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
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
LLVMBuild.txt
OcamlGCPrinter.cpp
WinException.cpp [WinEH] Allocate the registration node before the catch objects 2016-03-01 04:30:16 +00:00
WinException.h