diff options
Diffstat (limited to 'utils/TableGen/TableGen.cpp')
-rw-r--r-- | utils/TableGen/TableGen.cpp | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/utils/TableGen/TableGen.cpp b/utils/TableGen/TableGen.cpp index d5b6a3c12647..c485ed2feb7a 100644 --- a/utils/TableGen/TableGen.cpp +++ b/utils/TableGen/TableGen.cpp @@ -1,9 +1,8 @@ //===- TableGen.cpp - Top-Level TableGen implementation for LLVM ----------===// // -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // @@ -56,6 +55,12 @@ enum ActionType { GenExegesis, }; +namespace llvm { +/// Storage for TimeRegionsOpt as a global so that backends aren't required to +/// include CommandLine.h +bool TimeRegions = false; +} // end namespace llvm + namespace { cl::opt<ActionType> Action(cl::desc("Action to perform:"), @@ -127,6 +132,11 @@ namespace { Class("class", cl::desc("Print Enum list for this class"), cl::value_desc("class name"), cl::cat(PrintEnumsCat)); +cl::opt<bool, true> + TimeRegionsOpt("time-regions", + cl::desc("Time regions of tablegens execution"), + cl::location(TimeRegions)); + bool LLVMTableGenMain(raw_ostream &OS, RecordKeeper &Records) { switch (Action) { case PrintRecords: |