r235066 - DebugInfo: Prepare for DIScope to be gutted in LLVM

Duncan P. N. Exon Smith dexonsmith at apple.com
Wed Apr 15 18:36:36 PDT 2015


Author: dexonsmith
Date: Wed Apr 15 20:36:36 2015
New Revision: 235066

URL: http://llvm.org/viewvc/llvm-project?rev=235066&view=rev
Log:
DebugInfo: Prepare for DIScope to be gutted in LLVM

An upcoming LLVM commit will gut `DIScope`, so just use `MDScope*`
directly.

Modified:
    cfe/trunk/lib/CodeGen/CGDebugInfo.cpp

Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.cpp?rev=235066&r1=235065&r2=235066&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Wed Apr 15 20:36:36 2015
@@ -120,10 +120,10 @@ void CGDebugInfo::setLocation(SourceLoca
     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)) {





More information about the cfe-commits mailing list