[PATCH] D37563: Convenience/safety fix for llvm::sys::Execute(And|No)Wait

Vedant Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 8 16:48:34 PDT 2017


vsk added a comment.

It'd be nice to add in "expected 3 redirects" to the assert bodies.



================
Comment at: tools/llvm-cov/CodeCoverage.cpp:460
   ArgsV.push_back(nullptr);
-  StringRef InputPathRef = InputPath.str();
-  StringRef OutputPathRef = OutputPath.str();
-  StringRef StderrRef;
-  const StringRef *Redirects[] = {&InputPathRef, &OutputPathRef, &StderrRef};
+  Optional<StringRef> Redirects[] = {InputPath.str(), OutputPath.str(), {""}};
   std::string ErrMsg;
----------------
You've used llvm::None for the stderr redirect, and I think it would be clearer / more consistent to use llvm::None here too.


https://reviews.llvm.org/D37563





More information about the llvm-commits mailing list