diff --git a/lib/CodeGen/CoverageMappingGen.cpp b/lib/CodeGen/CoverageMappingGen.cpp
index c74e7b57714264d124b54cbc284ff36db2582955..0f87f8d50c6404030c00c6717c40525a4ce7b5fe 100644
--- a/lib/CodeGen/CoverageMappingGen.cpp
+++ b/lib/CodeGen/CoverageMappingGen.cpp
@@ -961,7 +961,7 @@ struct CounterCoverageMappingBuilder
   }
 };
 
-StringRef getCoverageSection(const CodeGenModule &CGM) {
+std::string getCoverageSection(const CodeGenModule &CGM) {
   return llvm::getInstrProfCoverageSectionName(&CGM.getModule());
 }