mirror of
https://github.com/RPCS3/llvm.git
synced 2026-07-21 03:05:26 -04:00
Assert that we have all use/users in the getters.
An error that is pretty easy to make is to use the lazy bitcode reader and then do something like if (V.use_empty()) The problem is that uses in unmaterialized functions are not accounted for. This patch adds asserts that all uses are known. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256105 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
+2
-4
@@ -394,10 +394,8 @@ std::error_code Module::materialize(GlobalValue *GV) {
|
||||
std::error_code Module::materializeAll() {
|
||||
if (!Materializer)
|
||||
return std::error_code();
|
||||
if (std::error_code EC = Materializer->materializeModule())
|
||||
return EC;
|
||||
Materializer.reset();
|
||||
return std::error_code();
|
||||
std::unique_ptr<GVMaterializer> M = std::move(Materializer);
|
||||
return M->materializeModule();
|
||||
}
|
||||
|
||||
std::error_code Module::materializeMetadata() {
|
||||
|
||||
Reference in New Issue
Block a user