]> granicus.if.org Git - llvm/commitdiff
Fix build error with clang and gcc.
authorZachary Turner <zturner@google.com>
Fri, 2 Jun 2017 20:00:10 +0000 (20:00 +0000)
committerZachary Turner <zturner@google.com>
Fri, 2 Jun 2017 20:00:10 +0000 (20:00 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304589 91177308-0d34-0410-b5e6-96231b3b80d8

lib/ObjectYAML/CodeViewYAMLDebugSections.cpp

index 1d62d1b26213a59674350cc3bdff3b3b60d607dc..a85dcf97cd4bc69fc2adffa29ef7b9d54a186800 100644 (file)
@@ -261,7 +261,7 @@ std::unique_ptr<DebugSubsection> YAMLLinesSubsection::toCodeViewSubsection(
       }
     }
   }
-  return Result;
+  return llvm::cast<DebugSubsection>(std::move(Result));
 }
 
 std::unique_ptr<DebugSubsection>
@@ -282,7 +282,7 @@ YAMLInlineeLinesSubsection::toCodeViewSubsection(
       Result->addExtraFile(EF);
     }
   }
-  return Result;
+  return llvm::cast<DebugSubsection>(std::move(Result));
 }
 
 static Expected<SourceFileChecksumEntry>