diff options
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp index 3a9d5fa..dddc08b 100644 --- a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp @@ -1397,6 +1397,12 @@ void CodeViewDebug::calculateRanges( if (Location->Register == 0 || Location->LoadChain.size() > 1) continue; + // Codeview can only express byte-aligned offsets, ensure that we have a + // byte-boundaried location. + if (Location->FragmentInfo) + if (Location->FragmentInfo->OffsetInBits % 8) + continue; + LocalVarDef DR; DR.CVRegister = TRI->getCodeViewRegNum(Location->Register); DR.InMemory = !Location->LoadChain.empty(); |