From e425956b7258eef15a83f0d98e43a67dc7703965 Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Wed, 16 May 2007 23:53:44 +0000 Subject: [PATCH] Default implementation of TargetInstrInfo::getBlockSize(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37138 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/TargetInstrInfo.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/Target/TargetInstrInfo.cpp b/lib/Target/TargetInstrInfo.cpp index d1413510fff..20f32a2ad9b 100644 --- a/lib/Target/TargetInstrInfo.cpp +++ b/lib/Target/TargetInstrInfo.cpp @@ -84,3 +84,7 @@ bool TargetInstrInfo::PredicateInstruction(MachineInstr *MI, } return MadeChange; } + +unsigned TargetInstrInfo::getBlockSize(MachineBasicBlock *MBB) const { + return (unsigned)std::distance(MBB->begin(), MBB->end()); +}