summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/IR')
-rw-r--r--llvm/lib/IR/DIBuilder.cpp2
-rw-r--r--llvm/lib/IR/DebugInfo.cpp14
-rw-r--r--llvm/lib/IR/DebugLoc.cpp2
-rw-r--r--llvm/lib/IR/Verifier.cpp2
4 files changed, 10 insertions, 10 deletions
diff --git a/llvm/lib/IR/DIBuilder.cpp b/llvm/lib/IR/DIBuilder.cpp
index 4fbe388799a..1f087888028 100644
--- a/llvm/lib/IR/DIBuilder.cpp
+++ b/llvm/lib/IR/DIBuilder.cpp
@@ -93,7 +93,7 @@ void DIBuilder::finalize() {
TempSubprograms->replaceAllUsesWith(SPs.get());
for (unsigned i = 0, e = SPs.size(); i != e; ++i) {
DISubprogram SP = cast<MDSubprogram>(SPs[i]);
- if (MDTuple *Temp = SP.getVariables().get()) {
+ if (MDTuple *Temp = SP->getVariables().get()) {
const auto &PV = PreservedVariables.lookup(SP);
SmallVector<Metadata *, 4> Variables(PV.begin(), PV.end());
DIArray AV = getOrCreateArray(Variables);
diff --git a/llvm/lib/IR/DebugInfo.cpp b/llvm/lib/IR/DebugInfo.cpp
index 2b7d7f04083..3ffd13064d4 100644
--- a/llvm/lib/IR/DebugInfo.cpp
+++ b/llvm/lib/IR/DebugInfo.cpp
@@ -74,7 +74,7 @@ DISubprogram llvm::getDISubprogram(const Function *F) {
DebugLoc DLoc = Inst->getDebugLoc();
const MDNode *Scope = DLoc.getInlinedAtScope();
DISubprogram Subprogram = getDISubprogram(Scope);
- return Subprogram.describes(F) ? Subprogram : DISubprogram();
+ return Subprogram->describes(F) ? Subprogram : DISubprogram();
}
return DISubprogram();
@@ -222,8 +222,8 @@ void DebugInfoFinder::processScope(DIScope Scope) {
}
if (!addScope(Scope))
return;
- if (DILexicalBlock LB = dyn_cast<MDLexicalBlockBase>(Scope)) {
- processScope(LB.getContext());
+ if (auto *LB = dyn_cast<MDLexicalBlockBase>(Scope)) {
+ processScope(LB->getScope());
} else if (auto *NS = dyn_cast<MDNamespace>(Scope)) {
processScope(NS->getScope());
}
@@ -232,9 +232,9 @@ void DebugInfoFinder::processScope(DIScope Scope) {
void DebugInfoFinder::processSubprogram(DISubprogram SP) {
if (!addSubprogram(SP))
return;
- processScope(SP.getContext().resolve(TypeIdentifierMap));
- processType(SP.getType());
- for (auto *Element : SP.getTemplateParams()) {
+ processScope(SP->getScope().resolve(TypeIdentifierMap));
+ processType(SP->getType());
+ for (auto *Element : SP->getTemplateParams()) {
if (auto *TType = dyn_cast<MDTemplateTypeParameter>(Element)) {
processType(TType->getType().resolve(TypeIdentifierMap));
} else if (auto *TVal = dyn_cast<MDTemplateValueParameter>(Element)) {
@@ -434,7 +434,7 @@ llvm::makeSubprogramMap(const Module &M) {
for (MDNode *N : CU_Nodes->operands()) {
DICompileUnit CUNode = cast<MDCompileUnit>(N);
for (DISubprogram SP : CUNode->getSubprograms()) {
- if (Function *F = SP.getFunction())
+ if (Function *F = SP->getFunction())
R.insert(std::make_pair(F, SP));
}
}
diff --git a/llvm/lib/IR/DebugLoc.cpp b/llvm/lib/IR/DebugLoc.cpp
index df4802d9549..984ee248836 100644
--- a/llvm/lib/IR/DebugLoc.cpp
+++ b/llvm/lib/IR/DebugLoc.cpp
@@ -51,7 +51,7 @@ DebugLoc DebugLoc::getFnDebugLoc() const {
// FIXME: Add a method on \a MDLocation that does this work.
const MDNode *Scope = getInlinedAtScope();
if (DISubprogram SP = getDISubprogram(Scope))
- return DebugLoc::get(SP.getScopeLineNumber(), 0, SP);
+ return DebugLoc::get(SP->getScopeLine(), 0, SP);
return DebugLoc();
}
diff --git a/llvm/lib/IR/Verifier.cpp b/llvm/lib/IR/Verifier.cpp
index ba1a8e8b762..2034f8b54f8 100644
--- a/llvm/lib/IR/Verifier.cpp
+++ b/llvm/lib/IR/Verifier.cpp
@@ -991,7 +991,7 @@ void Verifier::visitMDSubprogram(const MDSubprogram &N) {
continue;
// FIXME: Once N is canonical, check "SP == &N".
- Assert(DISubprogram(SP).describes(F),
+ Assert(SP->describes(F),
"!dbg attachment points at wrong subprogram for function", &N, F,
&I, DL, Scope, SP);
}
OpenPOWER on IntegriCloud