[llvm] r304589 - Fix build error with clang and gcc.

Zachary Turner via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 2 13:00:10 PDT 2017


Author: zturner
Date: Fri Jun  2 15:00:10 2017
New Revision: 304589

URL: http://llvm.org/viewvc/llvm-project?rev=304589&view=rev
Log:
Fix build error with clang and gcc.

Modified:
    llvm/trunk/lib/ObjectYAML/CodeViewYAMLDebugSections.cpp

Modified: llvm/trunk/lib/ObjectYAML/CodeViewYAMLDebugSections.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ObjectYAML/CodeViewYAMLDebugSections.cpp?rev=304589&r1=304588&r2=304589&view=diff
==============================================================================
--- llvm/trunk/lib/ObjectYAML/CodeViewYAMLDebugSections.cpp (original)
+++ llvm/trunk/lib/ObjectYAML/CodeViewYAMLDebugSections.cpp Fri Jun  2 15:00:10 2017
@@ -261,7 +261,7 @@ std::unique_ptr<DebugSubsection> YAMLLin
       }
     }
   }
-  return Result;
+  return llvm::cast<DebugSubsection>(std::move(Result));
 }
 
 std::unique_ptr<DebugSubsection>
@@ -282,7 +282,7 @@ YAMLInlineeLinesSubsection::toCodeViewSu
       Result->addExtraFile(EF);
     }
   }
-  return Result;
+  return llvm::cast<DebugSubsection>(std::move(Result));
 }
 
 static Expected<SourceFileChecksumEntry>




More information about the llvm-commits mailing list