Do not #include files into the llvm namespace

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15849 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2004-08-17 03:08:28 +00:00
parent 250c4184c7
commit 2c38413b3f
7 changed files with 20 additions and 18 deletions
+5 -2
View File
@@ -20,6 +20,7 @@ using namespace llvm;
// runEnums - Print out enum values for all of the instructions.
void InstrInfoEmitter::runEnums(std::ostream &OS) {
EmitSourceFileHeader("Target Instruction Enum Values", OS);
OS << "namespace llvm {\n\n";
CodeGenTarget Target;
@@ -45,7 +46,7 @@ void InstrInfoEmitter::runEnums(std::ostream &OS) {
OS << " };\n";
if (!Namespace.empty())
OS << "}\n";
EmitSourceFileTail(OS);
OS << "} // End llvm namespace \n";
}
void InstrInfoEmitter::printDefList(ListInit *LI, const std::string &Name,
@@ -63,6 +64,8 @@ void InstrInfoEmitter::printDefList(ListInit *LI, const std::string &Name,
// run - Emit the main instruction description records for the target...
void InstrInfoEmitter::run(std::ostream &OS) {
EmitSourceFileHeader("Target Instruction Descriptors", OS);
OS << "namespace llvm {\n\n";
CodeGenTarget Target;
const std::string &TargetName = Target.getName();
Record *InstrInfo = Target.getInstructionSet();
@@ -92,7 +95,7 @@ void InstrInfoEmitter::run(std::ostream &OS) {
if (II->second.TheDef != PHI)
emitRecord(II->second, ++i, InstrInfo, OS);
OS << "};\n";
EmitSourceFileTail(OS);
OS << "} // End llvm namespace \n";
}
void InstrInfoEmitter::emitRecord(const CodeGenInstruction &Inst, unsigned Num,