From ac6f892ed0130543aa55a7891644c7599aacbb78 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Mon, 7 Jul 2008 20:32:02 +0000 Subject: Move MachineMemOperand's constructor out of line, to avoid a #include dependency on Support/MathExtras.h in the header file. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53200 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/MachineInstr.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'lib/CodeGen/MachineInstr.cpp') diff --git a/lib/CodeGen/MachineInstr.cpp b/lib/CodeGen/MachineInstr.cpp index fe78828410..3025af9be9 100644 --- a/lib/CodeGen/MachineInstr.cpp +++ b/lib/CodeGen/MachineInstr.cpp @@ -23,6 +23,7 @@ #include "llvm/Target/TargetInstrDesc.h" #include "llvm/Target/TargetRegisterInfo.h" #include "llvm/Support/LeakDetector.h" +#include "llvm/Support/MathExtras.h" #include "llvm/Support/Streams.h" #include using namespace llvm; @@ -238,6 +239,16 @@ void MachineOperand::print(std::ostream &OS, const TargetMachine *TM) const { } } +//===----------------------------------------------------------------------===// +// MachineMemOperand Implementation +//===----------------------------------------------------------------------===// + +MachineMemOperand::MachineMemOperand(const Value *v, unsigned int f, + int64_t o, uint64_t s, unsigned int a) + : Offset(o), Size(s), V(v), + Flags((f & 7) | ((Log2_32(a) + 1) << 3)) { +} + //===----------------------------------------------------------------------===// // MachineInstr Implementation //===----------------------------------------------------------------------===// -- cgit v1.2.3