diff options
author | Chris Lattner <sabre@nondot.org> | 2007-05-06 09:29:57 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-05-06 09:29:57 +0000 |
commit | 44dadffe4bd58ab32961ca5fe537e8ba69c09243 (patch) | |
tree | 745eccd4ec6ba93e89d8c2d992db470dbd025134 /tools/llvmc | |
parent | 4bcca0f2ac85c918fc8617e34b7642e5e5233460 (diff) | |
download | external_llvm-44dadffe4bd58ab32961ca5fe537e8ba69c09243.zip external_llvm-44dadffe4bd58ab32961ca5fe537e8ba69c09243.tar.gz external_llvm-44dadffe4bd58ab32961ca5fe537e8ba69c09243.tar.bz2 |
switch tools to bitcode instead of bytecode
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36868 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvmc')
-rw-r--r-- | tools/llvmc/CompilerDriver.cpp | 21 | ||||
-rw-r--r-- | tools/llvmc/Makefile | 2 |
2 files changed, 7 insertions, 16 deletions
diff --git a/tools/llvmc/CompilerDriver.cpp b/tools/llvmc/CompilerDriver.cpp index 251da34..2f94ee8 100644 --- a/tools/llvmc/CompilerDriver.cpp +++ b/tools/llvmc/CompilerDriver.cpp @@ -15,8 +15,8 @@ #include "CompilerDriver.h" #include "ConfigLexer.h" #include "llvm/Module.h" +#include "llvm/ModuleProvider.h" #include "llvm/Bitcode/ReaderWriter.h" -#include "llvm/Bytecode/Reader.h" #include "llvm/Support/MemoryBuffer.h" #include "llvm/Support/Timer.h" #include "llvm/System/Signals.h" @@ -27,8 +27,6 @@ using namespace llvm; -static bool Bitcode = false; - namespace { void WriteAction(CompilerDriver::Action* action ) { @@ -69,17 +67,12 @@ void DumpConfigData(CompilerDriver::ConfigData* cd, const std::string& type ){ static bool GetBytecodeDependentLibraries(const std::string &fname, Module::LibraryListType& deplibs, - BCDecompressor_t *BCDC, std::string* ErrMsg) { ModuleProvider *MP = 0; - if (Bitcode) { - if (MemoryBuffer *Buffer = MemoryBuffer::getFileOrSTDIN(&fname[0], - fname.size())) { - MP = getBitcodeModuleProvider(Buffer); - if (MP == 0) delete Buffer; - } - } else { - MP = getBytecodeModuleProvider(fname, BCDC, ErrMsg); + if (MemoryBuffer *Buffer = MemoryBuffer::getFileOrSTDIN(&fname[0], + fname.size())) { + MP = getBitcodeModuleProvider(Buffer); + if (MP == 0) delete Buffer; } if (!MP) { deplibs.clear(); @@ -598,9 +591,7 @@ private: if (fullpath.isBytecodeFile()) { // Process the dependent libraries recursively Module::LibraryListType modlibs; - if (GetBytecodeDependentLibraries(fullpath.toString(),modlibs, - Compressor::decompressToNewBuffer, - &err)) { + if (GetBytecodeDependentLibraries(fullpath.toString(),modlibs, &err)) { // Traverse the dependent libraries list Module::lib_iterator LI = modlibs.begin(); Module::lib_iterator LE = modlibs.end(); diff --git a/tools/llvmc/Makefile b/tools/llvmc/Makefile index 4c66afc..fbbc7e8 100644 --- a/tools/llvmc/Makefile +++ b/tools/llvmc/Makefile @@ -8,7 +8,7 @@ ##===----------------------------------------------------------------------===## LEVEL = ../.. TOOLNAME = llvmc -LINK_COMPONENTS = support system core bcreader bitreader +LINK_COMPONENTS = support system core bitreader CONFIG_FILES = c cpp ll st EXTRA_DIST = c cpp ll ConfigLexer.cpp.cvs ConfigLexer.l.cvs REQUIRES_EH := 1 |