DebugInfo: Gut DIScope, DIEnumerator and DISubrange
[oota-llvm.git] / lib / CodeGen / AsmPrinter / DwarfDebug.cpp
index 87fb73284ee7c902b50791390e9a7ce43370c338..b59c5e3e049b4b8a2d578d8bcff7815d137745be 100644 (file)
@@ -1251,9 +1251,9 @@ void DwarfDebug::recordSourceLine(unsigned Line, unsigned Col, const MDNode *S,
   StringRef Dir;
   unsigned Src = 1;
   unsigned Discriminator = 0;
-  if (DIScope Scope = cast_or_null<MDScope>(S)) {
-    Fn = Scope.getFilename();
-    Dir = Scope.getDirectory();
+  if (auto *Scope = cast_or_null<MDScope>(S)) {
+    Fn = Scope->getFilename();
+    Dir = Scope->getDirectory();
     if (auto *LBF = dyn_cast<MDLexicalBlockFile>(Scope))
       Discriminator = LBF->getDiscriminator();