From 20e39f8d14f287c9191a1ad966c28c9e61d338ed Mon Sep 17 00:00:00 2001 From: Bob Haarman Date: Tue, 29 Aug 2017 01:45:54 +0000 Subject: [PATCH] [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". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311969 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/AsmPrinter/CodeViewDebug.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp b/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp index ed2c263d320..6a35e3214bd 100644 --- a/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp +++ b/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. -- 2.50.1