[llvm-cov] Attempt to appease an older builder
authorVedant Kumar <vsk@apple.com>
Fri, 15 Jul 2016 23:15:35 +0000 (23:15 +0000)
committerVedant Kumar <vsk@apple.com>
Fri, 15 Jul 2016 23:15:35 +0000 (23:15 +0000)
It's using a version of clang which can't (or won't) deduce an implicit
conversion from a SmallString to a StringRef. Write the conversion out
explicitly:

  http://lab.llvm.org:8011/builders/lldb-x86_64-ubuntu-14.04-buildserver/builds/8574

llvm-svn: 275647

llvm/tools/llvm-cov/CodeCoverage.cpp

index e9346cd..0a4d1a6 100644 (file)
@@ -346,7 +346,9 @@ void CodeCoverageTool::demangleSymbols(const CoverageMapping &Coverage) {
   for (const std::string &Arg : ViewOpts.DemanglerOpts)
     ArgsV.push_back(Arg.c_str());
   ArgsV.push_back(nullptr);
-  StringRef InputPathRef{InputPath}, OutputPathRef{OutputPath}, StderrRef;
+  StringRef InputPathRef = InputPath.str();
+  StringRef OutputPathRef = OutputPath.str();
+  StringRef StderrRef;
   const StringRef *Redirects[] = {&InputPathRef, &OutputPathRef, &StderrRef};
   std::string ErrMsg;
   int RC = sys::ExecuteAndWait(ViewOpts.DemanglerOpts[0], ArgsV.data(),