diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2004-08-24 17:52:35 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2004-08-24 17:52:35 +0000 |
commit | 1f079267dc8281f9cb92b23910de621b3387265a (patch) | |
tree | 501306b2f738fea75f179d52c13d73fc7d65328c /lib/VMCore | |
parent | d0d0a1a08f9e27f4c950e846e0a21c3c3f11e40c (diff) | |
download | external_llvm-1f079267dc8281f9cb92b23910de621b3387265a.zip external_llvm-1f079267dc8281f9cb92b23910de621b3387265a.tar.gz external_llvm-1f079267dc8281f9cb92b23910de621b3387265a.tar.bz2 |
Give the -time-passes tool option a global storage location so that its
value can be discovered by the various LLVM tools.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16032 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore')
-rw-r--r-- | lib/VMCore/Pass.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/VMCore/Pass.cpp b/lib/VMCore/Pass.cpp index 945a7ca..d6fe2fb 100644 --- a/lib/VMCore/Pass.cpp +++ b/lib/VMCore/Pass.cpp @@ -110,15 +110,16 @@ bool FunctionPassManager::run(Function &F) { // amount of time each pass takes to execute. This only happens with // -time-passes is enabled on the command line. // -static cl::opt<bool> -EnableTiming("time-passes", +bool llvm::TimePassesIsEnabled = false; +static cl::opt<bool,true> +EnableTiming("time-passes", cl::location(TimePassesIsEnabled), cl::desc("Time each pass, printing elapsed time for each on exit")); // createTheTimeInfo - This method either initializes the TheTimeInfo pointer to // a non null value (if the -time-passes option is enabled) or it leaves it // null. It may be called multiple times. void TimingInfo::createTheTimeInfo() { - if (!EnableTiming || TheTimeInfo) return; + if (!TimePassesIsEnabled || TheTimeInfo) return; // Constructed the first time this is called, iff -time-passes is enabled. // This guarantees that the object will be constructed before static globals, |