[llvm] r311969 - [codeview] don't try to emit variable locations without registers
Bob Haarman via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 28 18:45:55 PDT 2017
Author: inglorion
Date: Mon Aug 28 18:45:54 2017
New Revision: 311969
URL: http://llvm.org/viewvc/llvm-project?rev=311969&view=rev
Log:
[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".
Modified:
llvm/trunk/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp?rev=311969&r1=311968&r2=311969&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp Mon Aug 28 18:45:54 2017
@@ -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.
More information about the llvm-commits
mailing list