]> granicus.if.org Git - clang/commitdiff
DebugInfo: Prepare for DIScope to be gutted in LLVM
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Thu, 16 Apr 2015 01:36:36 +0000 (01:36 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Thu, 16 Apr 2015 01:36:36 +0000 (01:36 +0000)
An upcoming LLVM commit will gut `DIScope`, so just use `MDScope*`
directly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@235066 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGDebugInfo.cpp

index 1908ffa8097a181dadba9d5f735a6f79d11a8757..ed8bb20756f55e4886dacc09fff9d9468b4d4419 100644 (file)
@@ -120,10 +120,10 @@ void CGDebugInfo::setLocation(SourceLocation Loc) {
     return;
 
   SourceManager &SM = CGM.getContext().getSourceManager();
-  llvm::DIScope Scope = cast<llvm::MDScope>(LexicalBlockStack.back());
+  auto *Scope = cast<llvm::MDScope>(LexicalBlockStack.back());
   PresumedLoc PCLoc = SM.getPresumedLoc(CurLoc);
 
-  if (PCLoc.isInvalid() || Scope.getFilename() == PCLoc.getFilename())
+  if (PCLoc.isInvalid() || Scope->getFilename() == PCLoc.getFilename())
     return;
 
   if (auto *LBF = dyn_cast<llvm::MDLexicalBlockFile>(Scope)) {