mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-05-14 09:38:40 +00:00
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
This commit is contained in:
parent
37c154a1b2
commit
c51aeaf059
@ -20,8 +20,7 @@ ModuleProvider::~ModuleProvider() {
|
|||||||
/// materializeFunction - make sure the given function is fully read.
|
/// materializeFunction - make sure the given function is fully read.
|
||||||
///
|
///
|
||||||
Module* ModuleProvider::materializeModule() {
|
Module* ModuleProvider::materializeModule() {
|
||||||
// FIXME: throw an exception instead?
|
assert(TheModule && "Attempting to materialize an invalid module!");
|
||||||
if (!TheModule) return 0;
|
|
||||||
|
|
||||||
for (Module::iterator i = TheModule->begin(), e = TheModule->end();
|
for (Module::iterator i = TheModule->begin(), e = TheModule->end();
|
||||||
i != e; ++i)
|
i != e; ++i)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user