[llvm-commits] [llvm] r58606 - /llvm/trunk/lib/CodeGen/MachineFunction.cpp
Matthijs Kooijman
matthijs at stdin.nl
Mon Nov 3 03:16:44 PST 2008
Author: matthijs
Date: Mon Nov 3 05:16:43 2008
New Revision: 58606
URL: http://llvm.org/viewvc/llvm-project?rev=58606&view=rev
Log:
Make MachineFrameInfo::print not crash when no TargetFrameInfo is available.
Modified:
llvm/trunk/lib/CodeGen/MachineFunction.cpp
Modified: llvm/trunk/lib/CodeGen/MachineFunction.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineFunction.cpp?rev=58606&r1=58605&r2=58606&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineFunction.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineFunction.cpp Mon Nov 3 05:16:43 2008
@@ -396,7 +396,8 @@
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];
More information about the llvm-commits
mailing list