projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Modernize the error handling of the Materialize function.
[oota-llvm.git]
/
lib
/
IR
/
Module.cpp
diff --git
a/lib/IR/Module.cpp
b/lib/IR/Module.cpp
index f43080b72eed315b6b8cc77b16cfba07d4757b7c..e35eefbd45c5fce1173a6f0e2c340613a16e62a8 100644
(file)
--- a/
lib/IR/Module.cpp
+++ b/
lib/IR/Module.cpp
@@
-395,16
+395,11
@@
bool Module::isDematerializable(const GlobalValue *GV) const {
return false;
}
return false;
}
-
bool Module::Materialize(GlobalValue *GV, std::string *ErrInfo
) {
+
std::error_code Module::materialize(GlobalValue *GV
) {
if (!Materializer)
if (!Materializer)
- return false;
-
- std::error_code EC = Materializer->Materialize(GV);
- if (!EC)
- return false;
- if (ErrInfo)
- *ErrInfo = EC.message();
- return true;
+ return std::error_code();
+
+ return Materializer->materialize(GV);
}
void Module::Dematerialize(GlobalValue *GV) {
}
void Module::Dematerialize(GlobalValue *GV) {