From f8067c7f7c774899c18c03e6b4e0375350436bac Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Wed, 25 Sep 2019 14:53:06 +0000 Subject: [PATCH] [PatternMatch] Generalize brc_match (NFC). Preparation for D68013. llvm-svn: 372881 --- llvm/include/llvm/IR/PatternMatch.h | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/llvm/include/llvm/IR/PatternMatch.h b/llvm/include/llvm/IR/PatternMatch.h index 4be032b..05fa37b 100644 --- a/llvm/include/llvm/IR/PatternMatch.h +++ b/llvm/include/llvm/IR/PatternMatch.h @@ -1334,11 +1334,13 @@ struct br_match { inline br_match m_UnconditionalBr(BasicBlock *&Succ) { return br_match(Succ); } -template struct brc_match { +template +struct brc_match { Cond_t Cond; - BasicBlock *&T, *&F; + TrueBlock_t T; + FalseBlock_t F; - brc_match(const Cond_t &C, BasicBlock *&t, BasicBlock *&f) + brc_match(const Cond_t &C, const TrueBlock_t &t, const FalseBlock_t &f) : Cond(C), T(t), F(f) {} template bool match(OpTy *V) { @@ -1353,8 +1355,9 @@ template struct brc_match { }; template -inline brc_match m_Br(const Cond_t &C, BasicBlock *&T, BasicBlock *&F) { - return brc_match(C, T, F); +inline brc_match +m_Br(const Cond_t &C, BasicBlock *&T, BasicBlock *&F) { + return brc_match(C, T, F); } //===----------------------------------------------------------------------===// -- 2.7.4