projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
37c154a
)
Chris says it's better to assert that TheModule is valid than silently return 0.
author
Misha Brukman
<brukman+llvm@gmail.com>
Fri, 17 Oct 2003 21:59:57 +0000
(21:59 +0000)
committer
Misha Brukman
<brukman+llvm@gmail.com>
Fri, 17 Oct 2003 21:59:57 +0000
(21:59 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9212
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/VMCore/ModuleProvider.cpp
patch
|
blob
|
history
diff --git
a/lib/VMCore/ModuleProvider.cpp
b/lib/VMCore/ModuleProvider.cpp
index 7add84b0cb66912208661bafa35341f7467b9f3a..cbc82369a00ae52e98f0f73992688b7ddcbe5a51 100644
(file)
--- 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)