summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-02-07 23:48:32 +0000
committerChris Lattner <sabre@nondot.org>2007-02-07 23:48:32 +0000
commit7cf7c2b703e648cdf1184d406bd53a65050be212 (patch)
treeff053af208088c5ee74c60c83b5809f473edb223 /tools
parentc6d0b164295ff4400306b9077a8087584ba31224 (diff)
downloadllvm-7cf7c2b703e648cdf1184d406bd53a65050be212.tar.gz
llvm-7cf7c2b703e648cdf1184d406bd53a65050be212.tar.bz2
llvm-7cf7c2b703e648cdf1184d406bd53a65050be212.tar.xz
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')
-rw-r--r--tools/llvmc/CompilerDriver.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/tools/llvmc/CompilerDriver.cpp b/tools/llvmc/CompilerDriver.cpp
index 055a4f4a32..a076a46525 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
/// @{