[codeview] don't try to emit variable locations without registers

This fixes a problem introduced 311957, where the compiler would crash
with "fatal error: error in backend: unknown codeview register".

llvm-svn: 311969
This commit is contained in:
Bob Haarman 2017-08-29 01:45:54 +00:00
parent dd4c61ff10
commit a8d0d1ab91
1 changed files with 1 additions and 1 deletions

View File

@ -988,7 +988,7 @@ void CodeViewDebug::calculateRanges(
}
// If we don't know how to handle this range, skip past it.
if (!Supported || (Location.Offset && !Location.InMemory))
if (!Supported || Location.Register == 0 || (Location.Offset && !Location.InMemory))
continue;
// Handle the two cases we can handle: indirect in memory and in register.