mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 04:30:12 +00:00
Simplify code and silence warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15255 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
efe30ef790
commit
bcb11cf132
@ -1401,16 +1401,14 @@ Constant *BytecodeReader::ParseConstantValue(unsigned TypeID) {
|
||||
|
||||
// Check to see if we have already read this global variable...
|
||||
Value *Val = getValue(TypeID, Slot, false);
|
||||
GlobalValue *GV;
|
||||
if (Val) {
|
||||
if (!(GV = dyn_cast<GlobalValue>(Val)))
|
||||
error("GlobalValue not in ValueTable!");
|
||||
GlobalValue *GV = dyn_cast<GlobalValue>(Val);
|
||||
if (!GV) error("GlobalValue not in ValueTable!");
|
||||
if (Handler) Handler->handleConstantPointer(PT, Slot, GV);
|
||||
return GV;
|
||||
} else {
|
||||
error("Forward references are not allowed here.");
|
||||
}
|
||||
|
||||
if (Handler) Handler->handleConstantPointer(PT, Slot, GV );
|
||||
return GV;
|
||||
}
|
||||
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user