Skip to content
  • Dan Gohman's avatar
    Give NamedRegionTimer an Enabled flag, allowing all its clients to · 6e681a5f
    Dan Gohman authored
    switch from this:
    
      if (TimePassesIsEnabled) {
        NamedRegionTimer T(Name, GroupName);
        do_something();
      } else {
        do_something(); // duplicate the code, this time without a timer!
      }
    
    to this:
    
      {
        NamedRegionTimer T(Name, GroupName, TimePassesIsEnabled);
        do_something();
      }
    
    llvm-svn: 106285
    6e681a5f
Loading