diff options
author | Misha Brukman <brukman+llvm@gmail.com> | 2003-10-17 21:59:57 +0000 |
---|---|---|
committer | Misha Brukman <brukman+llvm@gmail.com> | 2003-10-17 21:59:57 +0000 |
commit | e5a2565b918e89f1a72de29584811649f79eefe1 (patch) | |
tree | 1fed67ba072e66cf06f6d8d27f4650e27f3d3ef9 /llvm/lib/VMCore/ModuleProvider.cpp | |
parent | 91dbd8fd828baa47ab58435408a036eaa15b8240 (diff) | |
download | bcm5719-llvm-e5a2565b918e89f1a72de29584811649f79eefe1.tar.gz bcm5719-llvm-e5a2565b918e89f1a72de29584811649f79eefe1.zip |
Chris says it's better to assert that TheModule is valid than silently return 0.
llvm-svn: 9212
Diffstat (limited to 'llvm/lib/VMCore/ModuleProvider.cpp')
-rw-r--r-- | llvm/lib/VMCore/ModuleProvider.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/VMCore/ModuleProvider.cpp b/llvm/lib/VMCore/ModuleProvider.cpp index 7add84b0cb6..cbc82369a00 100644 --- a/llvm/lib/VMCore/ModuleProvider.cpp +++ b/llvm/lib/VMCore/ModuleProvider.cpp @@ -20,8 +20,7 @@ ModuleProvider::~ModuleProvider() { /// materializeFunction - make sure the given function is fully read. /// Module* ModuleProvider::materializeModule() { - // FIXME: throw an exception instead? - if (!TheModule) return 0; + assert(TheModule && "Attempting to materialize an invalid module!"); for (Module::iterator i = TheModule->begin(), e = TheModule->end(); i != e; ++i) |