[llvm-commits] CVS: llvm/lib/VMCore/ModuleProvider.cpp
Misha Brukman
brukman at cs.uiuc.edu
Fri Oct 17 17:01:08 PDT 2003
Changes in directory llvm/lib/VMCore:
ModuleProvider.cpp updated: 1.4 -> 1.5
---
Log message:
Chris says it's better to assert that TheModule is valid than silently return 0.
---
Diffs of the changes: (+1 -2)
Index: llvm/lib/VMCore/ModuleProvider.cpp
diff -u llvm/lib/VMCore/ModuleProvider.cpp:1.4 llvm/lib/VMCore/ModuleProvider.cpp:1.5
--- llvm/lib/VMCore/ModuleProvider.cpp:1.4 Fri Oct 17 13:27:13 2003
+++ llvm/lib/VMCore/ModuleProvider.cpp Fri Oct 17 16:59:57 2003
@@ -20,8 +20,7 @@
/// 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)
More information about the llvm-commits
mailing list