diff options
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 6 | ||||
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp | 18 | ||||
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/WinCodeViewLineTables.cpp | 6 | ||||
-rw-r--r-- | llvm/lib/CodeGen/LiveDebugVariables.cpp | 4 | ||||
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp | 4 |
5 files changed, 19 insertions, 19 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 87fb73284ee..b59c5e3e049 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -1251,9 +1251,9 @@ void DwarfDebug::recordSourceLine(unsigned Line, unsigned Col, const MDNode *S, StringRef Dir; unsigned Src = 1; unsigned Discriminator = 0; - if (DIScope Scope = cast_or_null<MDScope>(S)) { - Fn = Scope.getFilename(); - Dir = Scope.getDirectory(); + if (auto *Scope = cast_or_null<MDScope>(S)) { + Fn = Scope->getFilename(); + Dir = Scope->getDirectory(); if (auto *LBF = dyn_cast<MDLexicalBlockFile>(Scope)) Discriminator = LBF->getDiscriminator(); diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp index aa4b7475eea..46f3eb3201d 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp @@ -903,8 +903,8 @@ std::string DwarfUnit::getParentContextString(DIScope Context) const { SmallVector<DIScope, 1> Parents; while (!isa<MDCompileUnit>(Context)) { Parents.push_back(Context); - if (Context.getContext()) - Context = resolve(Context.getContext()); + if (Context->getScope()) + Context = resolve(Context->getScope()); else // Structure, etc types will have a NULL context if they're at the top // level. @@ -916,8 +916,8 @@ std::string DwarfUnit::getParentContextString(DIScope Context) const { for (SmallVectorImpl<DIScope>::reverse_iterator I = Parents.rbegin(), E = Parents.rend(); I != E; ++I) { - DIScope Ctx = *I; - StringRef Name = Ctx.getName(); + const MDScope *Ctx = *I; + StringRef Name = Ctx->getName(); if (Name.empty() && isa<MDNamespace>(Ctx)) Name = "(anonymous namespace)"; if (!Name.empty()) { @@ -1364,9 +1364,9 @@ void DwarfUnit::constructSubrangeDIE(DIE &Buffer, DISubrange SR, DIE *IndexTy) { // C/C++. The Count value is the number of elements. Values are 64 bit. If // Count == -1 then the array is unbounded and we do not emit // DW_AT_lower_bound and DW_AT_count attributes. - int64_t LowerBound = SR.getLo(); + int64_t LowerBound = SR->getLowerBound(); int64_t DefaultLowerBound = getDefaultLowerBound(); - int64_t Count = SR.getCount(); + int64_t Count = SR->getCount(); if (DefaultLowerBound == -1 || LowerBound != DefaultLowerBound) addUInt(DW_Subrange, dwarf::DW_AT_lower_bound, None, LowerBound); @@ -1417,12 +1417,12 @@ void DwarfUnit::constructEnumTypeDIE(DIE &Buffer, DICompositeType CTy) { // Add enumerators to enumeration type. for (unsigned i = 0, N = Elements.size(); i < N; ++i) { - DIEnumerator Enum = dyn_cast_or_null<MDEnumerator>(Elements[i]); + auto *Enum = dyn_cast_or_null<MDEnumerator>(Elements[i]); if (Enum) { DIE &Enumerator = createAndAddDIE(dwarf::DW_TAG_enumerator, Buffer); - StringRef Name = Enum.getName(); + StringRef Name = Enum->getName(); addString(Enumerator, dwarf::DW_AT_name, Name); - int64_t Value = Enum.getEnumValue(); + int64_t Value = Enum->getValue(); addSInt(Enumerator, dwarf::DW_AT_const_value, dwarf::DW_FORM_sdata, Value); } diff --git a/llvm/lib/CodeGen/AsmPrinter/WinCodeViewLineTables.cpp b/llvm/lib/CodeGen/AsmPrinter/WinCodeViewLineTables.cpp index d859ee1a083..276e7dfb2eb 100644 --- a/llvm/lib/CodeGen/AsmPrinter/WinCodeViewLineTables.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/WinCodeViewLineTables.cpp @@ -24,9 +24,9 @@ StringRef WinCodeViewLineTables::getFullFilepath(const MDNode *S) { isa<MDLexicalBlockBase>(S)) && "Unexpected scope info"); - DIScope Scope = cast<MDScope>(S); - StringRef Dir = Scope.getDirectory(), - Filename = Scope.getFilename(); + auto *Scope = cast<MDScope>(S); + StringRef Dir = Scope->getDirectory(), + Filename = Scope->getFilename(); char *&Result = DirAndFilenameToFilepathMap[std::make_pair(Dir, Filename)]; if (Result) return Result; diff --git a/llvm/lib/CodeGen/LiveDebugVariables.cpp b/llvm/lib/CodeGen/LiveDebugVariables.cpp index a07a7c9e567..52532b1495a 100644 --- a/llvm/lib/CodeGen/LiveDebugVariables.cpp +++ b/llvm/lib/CodeGen/LiveDebugVariables.cpp @@ -362,9 +362,9 @@ static void printDebugLoc(DebugLoc DL, raw_ostream &CommentOS, if (!DL) return; - DIScope Scope = cast<MDScope>(DL.getScope()); + auto *Scope = cast<MDScope>(DL.getScope()); // Omit the directory, because it's likely to be long and uninteresting. - CommentOS << Scope.getFilename(); + CommentOS << Scope->getFilename(); CommentOS << ':' << DL.getLine(); if (DL.getCol() != 0) CommentOS << ':' << DL.getCol(); diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp index e6c34e0116b..636c0a741a7 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp @@ -527,8 +527,8 @@ void SDNode::print_details(raw_ostream &OS, const SelectionDAG *G) const { if (!L) return; - if (DIScope Scope = L->getScope()) - OS << Scope.getFilename(); + if (auto *Scope = L->getScope()) + OS << Scope->getFilename(); else OS << "<unknown>"; OS << ':' << L->getLine(); |