diff options
author | Chris Lattner <sabre@nondot.org> | 2007-02-07 23:48:32 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-02-07 23:48:32 +0000 |
commit | 7cf7c2b703e648cdf1184d406bd53a65050be212 (patch) | |
tree | ff053af208088c5ee74c60c83b5809f473edb223 /tools/llvmc | |
parent | c6d0b164295ff4400306b9077a8087584ba31224 (diff) | |
download | external_llvm-7cf7c2b703e648cdf1184d406bd53a65050be212.zip external_llvm-7cf7c2b703e648cdf1184d406bd53a65050be212.tar.gz external_llvm-7cf7c2b703e648cdf1184d406bd53a65050be212.tar.bz2 |
move an llvmc-specific function out of the bcreader into llvmc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34021 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvmc')
-rw-r--r-- | tools/llvmc/CompilerDriver.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tools/llvmc/CompilerDriver.cpp b/tools/llvmc/CompilerDriver.cpp index 055a4f4..a076a46 100644 --- a/tools/llvmc/CompilerDriver.cpp +++ b/tools/llvmc/CompilerDriver.cpp @@ -62,6 +62,23 @@ void DumpConfigData(CompilerDriver::ConfigData* cd, const std::string& type ){ DumpAction(&cd->Linker); } +static bool GetBytecodeDependentLibraries(const std::string &fname, + Module::LibraryListType& deplibs, + BCDecompressor_t *BCDC, + std::string* ErrMsg) { + ModuleProvider* MP = getBytecodeModuleProvider(fname, BCDC, ErrMsg); + if (!MP) { + deplibs.clear(); + return true; + } + Module* M = MP->releaseModule(ErrMsg); + deplibs = M->getLibraries(); + delete M; + delete MP; + return false; +} + + class CompilerDriverImpl : public CompilerDriver { /// @name Constructors /// @{ |