diff options
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp index 3d0ae1a9399..8dde4a1031b 100644 --- a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp @@ -944,9 +944,10 @@ void CodeViewDebug::collectVariableInfo(const DISubprogram *SP) { unsigned StructOffset = 0; // Handle fragments. - if (DIExpr && DIExpr->isFragment()) { + auto Fragment = DIExpr->getFragmentInfo(); + if (DIExpr && Fragment) { IsSubfield = true; - StructOffset = DIExpr->getFragmentOffsetInBits() / 8; + StructOffset = Fragment->OffsetInBits / 8; } else if (DIExpr && DIExpr->getNumElements() > 0) { continue; // Ignore unrecognized exprs. } |