summaryrefslogtreecommitdiffstats
path: root/llvm/tools/opt/BreakpointPrinter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools/opt/BreakpointPrinter.cpp')
-rw-r--r--llvm/tools/opt/BreakpointPrinter.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/tools/opt/BreakpointPrinter.cpp b/llvm/tools/opt/BreakpointPrinter.cpp
index eb89b9bca80..846211ba781 100644
--- a/llvm/tools/opt/BreakpointPrinter.cpp
+++ b/llvm/tools/opt/BreakpointPrinter.cpp
@@ -30,10 +30,10 @@ struct BreakpointPrinter : public ModulePass {
BreakpointPrinter(raw_ostream &out) : ModulePass(ID), Out(out) {}
void getContextName(DIDescriptor Context, std::string &N) {
- if (DINameSpace NS = dyn_cast<MDNamespace>(Context)) {
- if (!NS.getName().empty()) {
- getContextName(NS.getContext(), N);
- N = N + NS.getName().str() + "::";
+ if (auto *NS = dyn_cast<MDNamespace>(Context)) {
+ if (!NS->getName().empty()) {
+ getContextName(NS->getScope(), N);
+ N = N + NS->getName().str() + "::";
}
} else if (DIType TY = dyn_cast<MDType>(Context)) {
if (!TY.getName().empty()) {
OpenPOWER on IntegriCloud