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 | c51aeaf0592fce907086faec1f09f61f94c5931b (patch) | |
tree | a160b620c3e99a553909f7a7631226bcd96cd771 /lib/VMCore/ModuleProvider.cpp | |
parent | 37c154a1b2638ae10dc8ad4776b828d1383f1db1 (diff) |
Chris says it's better to assert that TheModule is valid than silently return 0.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9212 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/ModuleProvider.cpp')
-rw-r--r-- | lib/VMCore/ModuleProvider.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/VMCore/ModuleProvider.cpp b/lib/VMCore/ModuleProvider.cpp index 7add84b0cb..cbc82369a0 100644 --- a/lib/VMCore/ModuleProvider.cpp +++ b/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) |