[Reproducers] Support capturing a reproducer without an explicit path.
Tablegen doesn't support options that are both flags and take values as an argument. I noticed this when doing the tablegen rewrite, but forgot that that affected the reproducer --capture flag. This patch makes --capture a flag and adds --capture-path to specify a path for the reproducer. In reality I expect this to be mostly used for testing, but it could be useful nonetheless. Differential revision: https://reviews.llvm.org/D59238 llvm-svn: 355936
This commit is contained in:
@@ -2940,6 +2940,15 @@ SBRegistry::SBRegistry() {
|
||||
}
|
||||
}
|
||||
|
||||
const char *SBReproducer::Capture() {
|
||||
static std::string error;
|
||||
if (auto e = Reproducer::Initialize(ReproducerMode::Capture, llvm::None)) {
|
||||
error = llvm::toString(std::move(e));
|
||||
return error.c_str();
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
const char *SBReproducer::Capture(const char *path) {
|
||||
static std::string error;
|
||||
if (auto e =
|
||||
|
||||
Reference in New Issue
Block a user