Skip to content

Commit 326dd47

Browse files
committed
Remove GetLocForBlockFile
1 parent 9f51ebf commit 326dd47

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

llvm/lib/IR/DebugInfoMetadata.cpp

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -158,25 +158,17 @@ getNearestMatchingScope(const DILocation *L1, const DILocation *L2) {
158158
DIScope *S1 = L1->getScope();
159159
DIScope *S2 = L2->getScope();
160160

161-
// When matching DILexicalBlockFile's, ignore column numbers, so that
162-
// DILocation's having different columns within the same
163-
// DILexicalBlockFile will match.
164-
auto GetLocForBlockFile = [](LineColumn L) {
165-
L.second = 0;
166-
return L;
167-
};
168-
169161
LineColumn Loc1(L1->getLine(), L1->getColumn());
170162
for (; S1; S1 = S1->getScope()) {
171-
Loc1 = getLocalScopeLocationOr(S1, GetLocForBlockFile(Loc1));
163+
Loc1 = getLocalScopeLocationOr(S1, Loc1);
172164
Matcher.insert(S1, Loc1);
173165
if (isa<DISubprogram>(S1))
174166
break;
175167
}
176168

177169
LineColumn Loc2(L2->getLine(), L2->getColumn());
178170
for (; S2; S2 = S2->getScope()) {
179-
Loc2 = getLocalScopeLocationOr(S2, GetLocForBlockFile(Loc2));
171+
Loc2 = getLocalScopeLocationOr(S2, Loc2);
180172

181173
if (DIScope *S = Matcher.match(S2, Loc2))
182174
return std::make_pair(S, Loc2);

0 commit comments

Comments
 (0)