Fix use after free error
authorXinliang David Li <davidxl@google.com>
Fri, 14 Apr 2017 04:14:29 +0000 (04:14 +0000)
committerXinliang David Li <davidxl@google.com>
Fri, 14 Apr 2017 04:14:29 +0000 (04:14 +0000)
llvm-svn: 300304

clang/lib/CodeGen/CoverageMappingGen.cpp

index c74e7b5..0f87f8d 100644 (file)
@@ -961,7 +961,7 @@ struct CounterCoverageMappingBuilder
   }
 };
 
-StringRef getCoverageSection(const CodeGenModule &CGM) {
+std::string getCoverageSection(const CodeGenModule &CGM) {
   return llvm::getInstrProfCoverageSectionName(&CGM.getModule());
 }