From: Florian Hahn Date: Wed, 25 Sep 2019 14:53:06 +0000 (+0000) Subject: [PatternMatch] Generalize brc_match (NFC). X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=52b34f986434cb12bbf853d81e7cd5acb76cc8bf;p=llvm [PatternMatch] Generalize brc_match (NFC). Preparation for D68013. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372881 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/IR/PatternMatch.h b/include/llvm/IR/PatternMatch.h index 4be032bcb98..05fa37b1812 100644 --- a/include/llvm/IR/PatternMatch.h +++ b/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); } //===----------------------------------------------------------------------===//