Skip to content

Commit 95d8ec1

Browse files
committed
Remove GetLocForBlockFile
1 parent 9fb92c0 commit 95d8ec1

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
@@ -151,25 +151,17 @@ getNearestMatchingScope(const DILocation *L1, const DILocation *L2) {
151151
DIScope *S1 = L1->getScope();
152152
DIScope *S2 = L2->getScope();
153153

154-
// When matching DILexicalBlockFile's, ignore column numbers, so that
155-
// DILocation's having different columns within the same
156-
// DILexicalBlockFile will match.
157-
auto GetLocForBlockFile = [](LineColumn L) {
158-
L.second = 0;
159-
return L;
160-
};
161-
162154
LineColumn Loc1(L1->getLine(), L1->getColumn());
163155
for (; S1; S1 = S1->getScope()) {
164-
Loc1 = getLocalScopeLocationOr(S1, GetLocForBlockFile(Loc1));
156+
Loc1 = getLocalScopeLocationOr(S1, Loc1);
165157
Matcher.insert(S1, Loc1);
166158
if (isa<DISubprogram>(S1))
167159
break;
168160
}
169161

170162
LineColumn Loc2(L2->getLine(), L2->getColumn());
171163
for (; S2; S2 = S2->getScope()) {
172-
Loc2 = getLocalScopeLocationOr(S2, GetLocForBlockFile(Loc2));
164+
Loc2 = getLocalScopeLocationOr(S2, Loc2);
173165

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

0 commit comments

Comments
 (0)