]> granicus.if.org Git - llvm/commitdiff
[BlockExtractor] Change the basic block separator from ',' to ';'
authorQuentin Colombet <quentin.colombet@gmail.com>
Mon, 29 Apr 2019 16:14:00 +0000 (16:14 +0000)
committerQuentin Colombet <quentin.colombet@gmail.com>
Mon, 29 Apr 2019 16:14:00 +0000 (16:14 +0000)
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359462 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/IPO/BlockExtractor.cpp
test/Transforms/BlockExtractor/extract-blocks-with-groups.ll

index 31c09ebe43f6603781459e84b14edda7ccf21183..5cf2235bbffc7090cb26f0345bab7bdc0e7c4298 100644 (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");
index 0c5b173c1bf5e4e2eb049e4e0392f002d9da5632..d23c3f40d7c057ccc7766309e4ce8231e09629a1 100644 (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