From adca9604f182d96f3acf6fc58dfc77d23ebd6625 Mon Sep 17 00:00:00 2001 From: "Duncan P. N. Exon Smith" Date: Mon, 6 Apr 2015 22:04:18 +0000 Subject: [PATCH] DebugInfo: Use DILexicalBlockFile::getContext() over getScope() `getScope()` passes the scope back through a `DILexicalBlock` even though the underlying pointer may be an incompatible `MDSubprogram`. Just use `getContext()` directly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@234245 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CGDebugInfo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp index 811486cf3a..6e9533c7e7 100644 --- a/lib/CodeGen/CGDebugInfo.cpp +++ b/lib/CodeGen/CGDebugInfo.cpp @@ -129,7 +129,7 @@ void CGDebugInfo::setLocation(SourceLocation Loc) { if (Scope.isLexicalBlockFile()) { llvm::DILexicalBlockFile LBF = llvm::DILexicalBlockFile(Scope); llvm::DIDescriptor D = DBuilder.createLexicalBlockFile( - LBF.getScope(), getOrCreateFile(CurLoc)); + LBF.getContext(), getOrCreateFile(CurLoc)); llvm::MDNode *N = D; LexicalBlockStack.pop_back(); LexicalBlockStack.emplace_back(N); -- 2.40.0