DebugInfo: Gut DIScope, DIEnumerator and DISubrange
[oota-llvm.git] / lib / Transforms / Utils / AddDiscriminators.cpp
index 526dc34d65b40fd4bacdef38729f69908a70e04e..c1cd39abea7ce66a83658bcf0be66e1212dcf69f 100644 (file)
@@ -193,8 +193,8 @@ bool AddDiscriminators::runOnFunction(Function &F) {
         // Create a new lexical scope and compute a new discriminator
         // number for it.
         StringRef Filename = FirstDIL->getFilename();
-        DIScope Scope = FirstDIL->getScope();
-        DIFile File = Builder.createFile(Filename, Scope.getDirectory());
+        auto *Scope = FirstDIL->getScope();
+        DIFile File = Builder.createFile(Filename, Scope->getDirectory());
 
         // FIXME: Calculate the discriminator here, based on local information,
         // and delete MDLocation::computeNewDiscriminator().  The current