summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
diff options
context:
space:
mode:
authorBob Haarman <llvm@inglorion.net>2017-08-29 01:45:54 +0000
committerBob Haarman <llvm@inglorion.net>2017-08-29 01:45:54 +0000
commita8d0d1ab915519f7414786aab696f1d06a8ec04b (patch)
tree95cfd1e47914de9a7c4d10a4fc278f046fdf495b /llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
parentdd4c61ff10a6df0454e86d4fe28edda8d2f045ef (diff)
downloadbcm5719-llvm-a8d0d1ab915519f7414786aab696f1d06a8ec04b.tar.gz
bcm5719-llvm-a8d0d1ab915519f7414786aab696f1d06a8ec04b.zip
[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
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
index ed2c263d320..6a35e3214bd 100644
--- a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
@@ -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.
OpenPOWER on IntegriCloud