diff options
author | Dan Gohman <gohman@apple.com> | 2010-06-18 15:56:31 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-06-18 15:56:31 +0000 |
commit | 03c3dc7b6828d48a9f3be50896b3390a696caa64 (patch) | |
tree | fd34a907e926493b458a8d905ab6048dcbc4ad95 /lib/CodeGen/MachineDominators.cpp | |
parent | 27445f0375ae01652c08569c7843bddc95cedd61 (diff) |
Give NamedRegionTimer an Enabled flag, allowing all its clients to
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();
}
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106285 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/MachineDominators.cpp')
0 files changed, 0 insertions, 0 deletions