From 7af7d4cc84b92705b7674d260193382e08f4f2ee Mon Sep 17 00:00:00 2001 From: Quentin Colombet Date: Mon, 29 Apr 2019 16:14:00 +0000 Subject: [PATCH] [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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359462 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/IPO/BlockExtractor.cpp | 2 +- test/Transforms/BlockExtractor/extract-blocks-with-groups.ll | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Transforms/IPO/BlockExtractor.cpp b/lib/Transforms/IPO/BlockExtractor.cpp index 31c09ebe43f..5cf2235bbff 100644 --- a/lib/Transforms/IPO/BlockExtractor.cpp +++ b/lib/Transforms/IPO/BlockExtractor.cpp @@ -94,7 +94,7 @@ void BlockExtractor::loadFile() { if (LineSplit.empty()) continue; SmallVector BBNames; - LineSplit[1].split(BBNames, ',', /*MaxSplit=*/-1, + LineSplit[1].split(BBNames, ';', /*MaxSplit=*/-1, /*KeepEmpty=*/false); if (BBNames.empty()) report_fatal_error("Missing bbs name"); diff --git a/test/Transforms/BlockExtractor/extract-blocks-with-groups.ll b/test/Transforms/BlockExtractor/extract-blocks-with-groups.ll index 0c5b173c1bf..d23c3f40d7c 100644 --- a/test/Transforms/BlockExtractor/extract-blocks-with-groups.ll +++ b/test/Transforms/BlockExtractor/extract-blocks-with-groups.ll @@ -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 -- 2.40.0