summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Linker/LinkModules.cpp
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-04-14 03:40:37 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-04-14 03:40:37 +0000
commit537b4a8159fc07709b9cb4b8c4e65c6deae358b3 (patch)
treeaabc381361f0e80b53ac261c8aaa936a7d0782e1 /llvm/lib/Linker/LinkModules.cpp
parent68adb7da1abdca258ccfb87e929a42fd7e7af940 (diff)
downloadbcm5719-llvm-537b4a8159fc07709b9cb4b8c4e65c6deae358b3.tar.gz
bcm5719-llvm-537b4a8159fc07709b9cb4b8c4e65c6deae358b3.zip
DebugInfo: Gut DISubprogram and DILexicalBlock*
Gut the `DIDescriptor` wrappers around `MDLocalScope` subclasses. Note that `DILexicalBlock` wraps `MDLexicalBlockBase`, not `MDLexicalBlock`. llvm-svn: 234850
Diffstat (limited to 'llvm/lib/Linker/LinkModules.cpp')
-rw-r--r--llvm/lib/Linker/LinkModules.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/llvm/lib/Linker/LinkModules.cpp b/llvm/lib/Linker/LinkModules.cpp
index 75849db4999..03ab9fbd83c 100644
--- a/llvm/lib/Linker/LinkModules.cpp
+++ b/llvm/lib/Linker/LinkModules.cpp
@@ -1272,12 +1272,8 @@ void ModuleLinker::stripReplacedSubprograms() {
DICompileUnit CU = cast<MDCompileUnit>(CompileUnits->getOperand(I));
assert(CU && "Expected valid compile unit");
- MDSubprogramArray SPs(CU.getSubprograms());
- assert(SPs && "Expected valid subprogram array");
-
- for (unsigned S = 0, SE = SPs.size(); S != SE; ++S) {
- DISubprogram SP = SPs[S];
- if (!SP || !SP.getFunction() || !Functions.count(SP.getFunction()))
+ for (MDSubprogram *SP : CU->getSubprograms()) {
+ if (!SP || !SP->getFunction() || !Functions.count(SP->getFunction()))
continue;
// Prevent DebugInfoFinder from tagging this as the canonical subprogram,
OpenPOWER on IntegriCloud