From: Zhongxing Xu Date: Wed, 30 Dec 2009 06:38:20 +0000 (+0000) Subject: Simplify code by using an equivalent template class. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=84eaeffe94ef63a182a02fcf935d4c651caf2359;p=clang Simplify code by using an equivalent template class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92305 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Analysis/LiveVariables.cpp b/lib/Analysis/LiveVariables.cpp index e6fd1627e2..0b2620e609 100644 --- a/lib/Analysis/LiveVariables.cpp +++ b/lib/Analysis/LiveVariables.cpp @@ -301,17 +301,8 @@ void TransferFuncs::VisitDeclStmt(DeclStmt* DS) { //===----------------------------------------------------------------------===// namespace { - -struct Merge { - typedef StmtDeclBitVector_Types::ValTy ValTy; - - void operator()(ValTy& Dst, const ValTy& Src) { - Dst.OrDeclBits(Src); - Dst.OrBlkExprBits(Src); - } -}; - -typedef DataflowSolver Solver; + typedef StmtDeclBitVector_Types::Union Merge; + typedef DataflowSolver Solver; } // end anonymous namespace //===----------------------------------------------------------------------===//