diff options
author | Mikhail Glushenkov <foldr@codedgers.com> | 2010-07-23 03:42:55 +0000 |
---|---|---|
committer | Mikhail Glushenkov <foldr@codedgers.com> | 2010-07-23 03:42:55 +0000 |
commit | b374d4fd82ec01f8549a69a25f4938584c136111 (patch) | |
tree | ce0ecf3b2a6b2b169c9fd2b43f9af97838e99bbc /lib/CompilerDriver/Plugin.cpp | |
parent | a23650bc0161716aadba97e2e5f92eac7c11d80b (diff) |
Get rid of exceptions in llvmc.
llvmc can be now compiled with llvm-gcc on Windows.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109215 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CompilerDriver/Plugin.cpp')
-rw-r--r-- | lib/CompilerDriver/Plugin.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/CompilerDriver/Plugin.cpp b/lib/CompilerDriver/Plugin.cpp index 0fdfef4c6a..c06bda3eff 100644 --- a/lib/CompilerDriver/Plugin.cpp +++ b/lib/CompilerDriver/Plugin.cpp @@ -62,17 +62,22 @@ namespace llvmc { pluginListInitialized = false; } - void PluginLoader::RunInitialization(LanguageMap& langMap, + int PluginLoader::RunInitialization(LanguageMap& langMap, CompilationGraph& graph) const { llvm::sys::SmartScopedLock<true> Lock(*PluginMutex); for (PluginList::iterator B = Plugins.begin(), E = Plugins.end(); B != E; ++B) { const BasePlugin* BP = *B; - BP->PreprocessOptions(); - BP->PopulateLanguageMap(langMap); - BP->PopulateCompilationGraph(graph); + if (int ret = BP->PreprocessOptions()) + return ret; + if (int ret = BP->PopulateLanguageMap(langMap)) + return ret; + if (int ret = BP->PopulateCompilationGraph(graph)) + return ret; } + + return 0; } } |