Skip to content
Commit 4ddd0596 authored by Adrian Prantl's avatar Adrian Prantl
Browse files

Prevent DILocation::getMergedLocation() from creating invalid metadata.

The function's new implementation from r340583 had a bug in it that
could cause an invalid scope to be generated when merging two
DILocations with no common ancestor scope.

This patch detects this situation and picks the scope of the first
location. This is not perfect, because the scope is misleading, but on
the other hand, this will be a line 0 location.

rdar://problem/43687474

Differential Revision: https://reviews.llvm.org/D51238

llvm-svn: 340672
parent 2b1dc39d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment