From: Chris Lattner Date: Sat, 4 Oct 2003 20:14:59 +0000 (+0000) Subject: Rename AbstractModuleProvider -> ModuleProvider, to match the header file name, X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=00413e3d63c99ceed5d162ef650ad74c0db4e5d8;p=oota-llvm.git Rename AbstractModuleProvider -> ModuleProvider, to match the header file name, and because, while the class used by the interface is abstract, the actual concept is not. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8850 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/Bytecode/Reader.h b/include/llvm/Bytecode/Reader.h index e195a322d1a..4bff87db731 100644 --- a/include/llvm/Bytecode/Reader.h +++ b/include/llvm/Bytecode/Reader.h @@ -18,16 +18,14 @@ /// getBytecodeModuleProvider - lazy function-at-a-time loading from a file /// -AbstractModuleProvider* -getBytecodeModuleProvider(const std::string &Filename); +ModuleProvider *getBytecodeModuleProvider(const std::string &Filename); /// getBytecodeBufferModuleProvider - lazy function-at-a-time loading from a /// buffer /// -AbstractModuleProvider* -getBytecodeBufferModuleProvider(const unsigned char *Buffer, - unsigned BufferSize, - const std::string &ModuleID = ""); +ModuleProvider *getBytecodeBufferModuleProvider(const unsigned char *Buffer, + unsigned BufferSize, + const std::string &ModuleID=""); /// ParseBytecodeFile - Parse the given bytecode file /// diff --git a/include/llvm/ModuleProvider.h b/include/llvm/ModuleProvider.h index e8e6052c0f9..8f7010360cc 100644 --- a/include/llvm/ModuleProvider.h +++ b/include/llvm/ModuleProvider.h @@ -14,13 +14,13 @@ class Function; class Module; -class AbstractModuleProvider { +class ModuleProvider { protected: Module *TheModule; - AbstractModuleProvider(); + ModuleProvider(); public: - virtual ~AbstractModuleProvider(); + virtual ~ModuleProvider(); /// getModule - returns the module this provider is encapsulating. /// diff --git a/lib/Bytecode/Reader/ReaderInternals.h b/lib/Bytecode/Reader/ReaderInternals.h index 5ce76868943..f08cedf8cfb 100644 --- a/lib/Bytecode/Reader/ReaderInternals.h +++ b/lib/Bytecode/Reader/ReaderInternals.h @@ -43,7 +43,7 @@ struct LazyFunctionInfo { unsigned FunctionSlot; }; -class BytecodeParser : public AbstractModuleProvider { +class BytecodeParser : public ModuleProvider { BytecodeParser(const BytecodeParser &); // DO NOT IMPLEMENT void operator=(const BytecodeParser &); // DO NOT IMPLEMENT public: diff --git a/lib/Bytecode/Reader/ReaderWrappers.cpp b/lib/Bytecode/Reader/ReaderWrappers.cpp index a936c0f72aa..68f210175b9 100644 --- a/lib/Bytecode/Reader/ReaderWrappers.cpp +++ b/lib/Bytecode/Reader/ReaderWrappers.cpp @@ -156,7 +156,7 @@ BytecodeStdinReader::BytecodeStdinReader() { /// getBytecodeBufferModuleProvider - lazy function-at-a-time loading from a /// buffer -AbstractModuleProvider* +ModuleProvider* getBytecodeBufferModuleProvider(const unsigned char *Buffer, unsigned Length, const std::string &ModuleID) { return new BytecodeBufferReader(Buffer, Length, ModuleID); @@ -167,7 +167,7 @@ getBytecodeBufferModuleProvider(const unsigned char *Buffer, unsigned Length, Module *ParseBytecodeBuffer(const unsigned char *Buffer, unsigned Length, const std::string &ModuleID, std::string *ErrorStr){ try { - std::auto_ptr + std::auto_ptr AMP(getBytecodeBufferModuleProvider(Buffer, Length, ModuleID)); return AMP->releaseModule(); } catch (std::string &err) { @@ -178,8 +178,7 @@ Module *ParseBytecodeBuffer(const unsigned char *Buffer, unsigned Length, /// getBytecodeModuleProvider - lazy function-at-a-time loading from a file /// -AbstractModuleProvider* -getBytecodeModuleProvider(const std::string &Filename) { +ModuleProvider *getBytecodeModuleProvider(const std::string &Filename) { if (Filename != std::string("-")) // Read from a file... return new BytecodeFileReader(Filename); else // Read from stdin @@ -190,8 +189,7 @@ getBytecodeModuleProvider(const std::string &Filename) { /// Module *ParseBytecodeFile(const std::string &Filename, std::string *ErrorStr) { try { - std::auto_ptr - AMP(getBytecodeModuleProvider(Filename)); + std::auto_ptr AMP(getBytecodeModuleProvider(Filename)); return AMP->releaseModule(); } catch (std::string &err) { if (ErrorStr) *ErrorStr = err; diff --git a/lib/VMCore/ModuleProvider.cpp b/lib/VMCore/ModuleProvider.cpp index 9a3eb168d96..3a9c50528e2 100644 --- a/lib/VMCore/ModuleProvider.cpp +++ b/lib/VMCore/ModuleProvider.cpp @@ -9,17 +9,17 @@ /// ctor - always have a valid Module /// -AbstractModuleProvider::AbstractModuleProvider() : TheModule(0) { } +ModuleProvider::ModuleProvider() : TheModule(0) { } /// dtor - when we leave, we take our Module with us /// -AbstractModuleProvider::~AbstractModuleProvider() { +ModuleProvider::~ModuleProvider() { delete TheModule; } /// materializeFunction - make sure the given function is fully read. /// -void AbstractModuleProvider::materializeModule() { +void ModuleProvider::materializeModule() { if (!TheModule) return; for (Module::iterator i = TheModule->begin(), e = TheModule->end();