diff options
| author | Adrian Prantl <aprantl@apple.com> | 2016-12-22 05:27:12 +0000 |
|---|---|---|
| committer | Adrian Prantl <aprantl@apple.com> | 2016-12-22 05:27:12 +0000 |
| commit | 49797ca6be3f13148dc8a92681579a3278519d06 (patch) | |
| tree | 465a4157921bb722005fa76c96c69e5b428842fd /llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp | |
| parent | b458841745c1aa624d776c7a198ed2ec12d8621f (diff) | |
Refactor the DIExpression fragment query interface (NFC)
... so it becomes available to DIExpressionCursor.
llvm-svn: 290322
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 3d0ae1a93992..8dde4a1031b0 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. } |
