当前位置: 首页>>代码示例>>C++>>正文


C++ Factory::Add方法代码示例

本文整理汇总了C++中Factory::Add方法的典型用法代码示例。如果您正苦于以下问题:C++ Factory::Add方法的具体用法?C++ Factory::Add怎么用?C++ Factory::Add使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Factory的用法示例。


在下文中一共展示了Factory::Add方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: AddGT

  RangeSet AddGT(BasicValueFactory &BV, Factory &F, const llvm::APSInt &V) {
    PrimRangeSet newRanges = F.GetEmptySet();

    for (PrimRangeSet::iterator i = begin(), e = end(); i != e; ++i) {
      if (i->Includes(V) && i->To() > V)
        newRanges = F.Add(newRanges, Range(BV.Add1(V), i->To()));
      else if (i->From() > V)
        newRanges = F.Add(newRanges, *i);
    }
    
    return newRanges;
  }
开发者ID:Killfrra,项目名称:llvm-kernel,代码行数:12,代码来源:RangeConstraintManager.cpp

示例2: AddGE

  RangeSet AddGE(BasicValueFactory &BV, Factory &F, const llvm::APSInt &V) {
    PrimRangeSet newRanges = F.GetEmptySet();

    for (PrimRangeSet::iterator i = begin(), e = end(); i != e; ++i) {
      // Strictly we should test for includes *V - 1, but no harm is
      // done by this formulation
      if (i->Includes(V))
        newRanges = F.Add(newRanges, Range(V, i->To()));
      else if (i->From() >= V)
        newRanges = F.Add(newRanges, *i);
    }

    return newRanges;
  }
开发者ID:Killfrra,项目名称:llvm-kernel,代码行数:14,代码来源:RangeConstraintManager.cpp

示例3: AddNE

 /// AddNE - Create a new RangeSet with the additional constraint that the
 ///  value be not be equal to V.
 RangeSet AddNE(BasicValueFactory &BV, Factory &F, const llvm::APSInt &V) {
   PrimRangeSet newRanges = ranges;
   
   // FIXME: We can perhaps enhance ImmutableSet to do this search for us
   // in log(N) time using the sorted property of the internal AVL tree.
   for (iterator i = begin(), e = end(); i != e; ++i) {
     if (i->Includes(V)) {
       // Remove the old range.
       newRanges = F.Remove(newRanges, *i);
       // Split the old range into possibly one or two ranges.
       if (V != i->From())
         newRanges = F.Add(newRanges, Range(i->From(), BV.Sub1(V)));
       if (V != i->To())
         newRanges = F.Add(newRanges, Range(BV.Add1(V), i->To()));
       // All of the ranges are non-overlapping, so we can stop.        
       break;
     }
   }
   
   return newRanges;
 }
开发者ID:Killfrra,项目名称:llvm-kernel,代码行数:23,代码来源:RangeConstraintManager.cpp

示例4: RangeSet

 /// Construct a new RangeSet representing '{ [from, to] }'.
 RangeSet(Factory &F, const llvm::APSInt &from, const llvm::APSInt &to)
   : ranges(F.Add(F.GetEmptySet(), Range(from, to))) {}
开发者ID:Killfrra,项目名称:llvm-kernel,代码行数:3,代码来源:RangeConstraintManager.cpp


注:本文中的Factory::Add方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。