Move MachineMemOperand's constructor out of line, to avoid a
authorDan Gohman <gohman@apple.com>
Mon, 7 Jul 2008 20:32:02 +0000 (20:32 +0000)
committerDan Gohman <gohman@apple.com>
Mon, 7 Jul 2008 20:32:02 +0000 (20:32 +0000)
#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

include/llvm/CodeGen/MachineMemOperand.h
lib/CodeGen/MachineInstr.cpp

index 5ab27e91a2f118e3f32b9835045e23abf06062fd..992d7d6d252d23a917d2eb1ddfee66b87ba7393e 100644 (file)
@@ -16,8 +16,6 @@
 #ifndef LLVM_CODEGEN_MEMOPERAND_H
 #define LLVM_CODEGEN_MEMOPERAND_H
 
-#include "llvm/Support/MathExtras.h"
-
 namespace llvm {
 
 class Value;
@@ -50,8 +48,7 @@ public:
   /// MachineMemOperand - Construct an MachineMemOperand object with the
   /// specified address Value, flags, offset, size, and alignment.
   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)) {}
+                    unsigned int a);
 
   /// getValue - Return the base address of the memory access.
   /// Special values are PseudoSourceValue::FPRel, PseudoSourceValue::SPRel,
index fe78828410c2b8847fa2b63740245d179bbd81c7..3025af9be96394b6808b0907b30ee6eab7cae03d 100644 (file)
@@ -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 <ostream>
 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
 //===----------------------------------------------------------------------===//