summaryrefslogtreecommitdiff
path: root/utils/TableGen/TableGen.cpp
diff options
context:
space:
mode:
authorBrian Gaeke <gaeke@uiuc.edu>2003-11-11 22:41:34 +0000
committerBrian Gaeke <gaeke@uiuc.edu>2003-11-11 22:41:34 +0000
commitd0fde30ce850b78371fd1386338350591f9ff494 (patch)
tree83bb73e83f54fc8e1e474d116250ae2779562f7e /utils/TableGen/TableGen.cpp
parent0d723acf15b0326e2df09ecb614b02a617f536e4 (diff)
downloadllvm-d0fde30ce850b78371fd1386338350591f9ff494.tar.gz
llvm-d0fde30ce850b78371fd1386338350591f9ff494.tar.bz2
llvm-d0fde30ce850b78371fd1386338350591f9ff494.tar.xz
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
Diffstat (limited to 'utils/TableGen/TableGen.cpp')
-rw-r--r--utils/TableGen/TableGen.cpp10
1 files changed, 10 insertions, 0 deletions
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 <cstdio>
#include <fstream>
+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<Record*> 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) {