From d0fde30ce850b78371fd1386338350591f9ff494 Mon Sep 17 00:00:00 2001 From: Brian Gaeke Date: Tue, 11 Nov 2003 22:41:34 +0000 Subject: Put all LLVM code into the llvm namespace, as per bug 109. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9903 91177308-0d34-0410-b5e6-96231b3b80d8 --- utils/TableGen/TableGen.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'utils/TableGen/TableGen.cpp') diff --git a/utils/TableGen/TableGen.cpp b/utils/TableGen/TableGen.cpp index 803d0f0fdd..c05ccb0bb1 100644 --- a/utils/TableGen/TableGen.cpp +++ b/utils/TableGen/TableGen.cpp @@ -27,6 +27,8 @@ #include #include +namespace llvm { + enum ActionType { PrintRecords, GenEmitter, @@ -406,6 +408,9 @@ static void ParseMachineCode() { } } +} // End llvm namespace + +using namespace llvm; int main(int argc, char **argv) { cl::ParseCommandLineOptions(argc, argv); @@ -459,12 +464,17 @@ int main(int argc, char **argv) { InstrSelectorEmitter(Records).run(*Out); break; case PrintEnums: + { std::vector Recs = Records.getAllDerivedDefinitions(Class); for (unsigned i = 0, e = Recs.size(); i != e; ++i) *Out << Recs[i] << ", "; *Out << "\n"; break; } + default: + assert(1 && "Invalid Action"); + return 1; + } } catch (const std::string &Error) { std::cerr << Error << "\n"; if (Out != &std::cout) { -- cgit v1.2.3