[BlockExtractor] Change the basic block separator from ',' to ';'

This change aims at making the file format be compatible with the
way LLVM handles command line options.

Differential Revision: https://reviews.llvm.org/D60970

llvm-svn: 359462
This commit is contained in:
Quentin Colombet 2019-04-29 16:14:00 +00:00
parent a25c928302
commit ae2cbb3400
2 changed files with 3 additions and 3 deletions

View File

@ -94,7 +94,7 @@ void BlockExtractor::loadFile() {
if (LineSplit.empty())
continue;
SmallVector<StringRef, 4> BBNames;
LineSplit[1].split(BBNames, ',', /*MaxSplit=*/-1,
LineSplit[1].split(BBNames, ';', /*MaxSplit=*/-1,
/*KeepEmpty=*/false);
if (BBNames.empty())
report_fatal_error("Missing bbs name");

View File

@ -1,8 +1,8 @@
; Extract the 'if', 'then', and 'else' blocks into the same function.
; RUN: echo 'foo if,then,else' > %t
; RUN: echo 'foo if;then;else' > %t
; Make sure we can still extract a single basic block
; RUN: echo 'foo end' >> %t
; RUN: echo 'bar bb14,bb20' >> %t
; RUN: echo 'bar bb14;bb20' >> %t
; RUN: opt -S -extract-blocks -extract-blocks-file=%t %s | FileCheck %s
; CHECK-LABEL: foo