diff options
Diffstat (limited to 'utils/TableGen/LLVMCConfigurationEmitter.cpp')
-rw-r--r-- | utils/TableGen/LLVMCConfigurationEmitter.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/utils/TableGen/LLVMCConfigurationEmitter.cpp b/utils/TableGen/LLVMCConfigurationEmitter.cpp index b091419f91..48c7cc375f 100644 --- a/utils/TableGen/LLVMCConfigurationEmitter.cpp +++ b/utils/TableGen/LLVMCConfigurationEmitter.cpp @@ -2909,7 +2909,6 @@ void EmitHookDeclarations(const ToolDescriptions& ToolDescs, if (HookNames.empty()) return; - O << "namespace hooks {\n"; for (HookInfoMap::const_iterator B = HookNames.begin(), E = HookNames.end(); B != E; ++B) { const char* HookName = B->first(); @@ -2928,7 +2927,6 @@ void EmitHookDeclarations(const ToolDescriptions& ToolDescs, O <<");\n"; } - O << "}\n\n"; } /// EmitIncludes - Emit necessary #include directives and some @@ -3013,12 +3011,19 @@ void EmitPluginCode(const PluginData& Data, raw_ostream& O) { EmitIncludes(O); // Emit global option registration code. + O << "namespace llvmc {\n" + << "namespace autogenerated {\n\n"; EmitOptionDefinitions(Data.OptDescs, Data.HasSink, O); + O << "} // End namespace autogenerated.\n" + << "} // End namespace llvmc.\n\n"; // Emit hook declarations. + O << "namespace hooks {\n"; EmitHookDeclarations(Data.ToolDescs, Data.OptDescs, O); + O << "} // End namespace hooks.\n\n"; O << "namespace {\n\n"; + O << "using namespace llvmc::autogenerated;\n\n"; // Emit Tool classes. for (ToolDescriptions::const_iterator B = Data.ToolDescs.begin(), |