mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-14 14:24:05 +00:00
Modernize the error handling of the Materialize function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220600 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -56,7 +56,7 @@ std::error_code BitcodeReader::materializeForwardReferencedFunctions() {
|
||||
return Error(BitcodeError::NeverResolvedFunctionFromBlockAddress);
|
||||
|
||||
// Try to materialize F.
|
||||
if (std::error_code EC = Materialize(F))
|
||||
if (std::error_code EC = materialize(F))
|
||||
return EC;
|
||||
}
|
||||
assert(BasicBlockFwdRefs.empty() && "Function missing from queue");
|
||||
@ -3282,7 +3282,7 @@ std::error_code BitcodeReader::FindFunctionInStream(
|
||||
|
||||
void BitcodeReader::releaseBuffer() { Buffer.release(); }
|
||||
|
||||
std::error_code BitcodeReader::Materialize(GlobalValue *GV) {
|
||||
std::error_code BitcodeReader::materialize(GlobalValue *GV) {
|
||||
Function *F = dyn_cast<Function>(GV);
|
||||
// If it's not a function or is already material, ignore the request.
|
||||
if (!F || !F->isMaterializable())
|
||||
@ -3358,7 +3358,7 @@ std::error_code BitcodeReader::MaterializeModule(Module *M) {
|
||||
for (Module::iterator F = TheModule->begin(), E = TheModule->end();
|
||||
F != E; ++F) {
|
||||
if (F->isMaterializable()) {
|
||||
if (std::error_code EC = Materialize(F))
|
||||
if (std::error_code EC = materialize(F))
|
||||
return EC;
|
||||
}
|
||||
}
|
||||
|
@ -224,7 +224,7 @@ public:
|
||||
void releaseBuffer();
|
||||
|
||||
bool isDematerializable(const GlobalValue *GV) const override;
|
||||
std::error_code Materialize(GlobalValue *GV) override;
|
||||
std::error_code materialize(GlobalValue *GV) override;
|
||||
std::error_code MaterializeModule(Module *M) override;
|
||||
void Dematerialize(GlobalValue *GV) override;
|
||||
|
||||
|
Reference in New Issue
Block a user