mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-02 07:32:52 +00:00
Make MachineFrameInfo::print not crash when no TargetFrameInfo is available.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58606 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9200605cd5
commit
06140888b1
@ -396,7 +396,8 @@ int MachineFrameInfo::CreateFixedObject(uint64_t Size, int64_t SPOffset,
|
||||
|
||||
|
||||
void MachineFrameInfo::print(const MachineFunction &MF, std::ostream &OS) const{
|
||||
int ValOffset = MF.getTarget().getFrameInfo()->getOffsetOfLocalArea();
|
||||
const TargetFrameInfo *FI = MF.getTarget().getFrameInfo();
|
||||
int ValOffset = (FI ? FI->getOffsetOfLocalArea() : 0);
|
||||
|
||||
for (unsigned i = 0, e = Objects.size(); i != e; ++i) {
|
||||
const StackObject &SO = Objects[i];
|
||||
|
Loading…
Reference in New Issue
Block a user