aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-07-07 20:32:02 +0000
committerDan Gohman <gohman@apple.com>2008-07-07 20:32:02 +0000
commitac6f892ed0130543aa55a7891644c7599aacbb78 (patch)
tree963759cb056d1b4abff08335907a5f7e19af8538
parent56fa3d8a70c9658efeee977f61accfbebf0ce6b5 (diff)
downloadexternal_llvm-ac6f892ed0130543aa55a7891644c7599aacbb78.zip
external_llvm-ac6f892ed0130543aa55a7891644c7599aacbb78.tar.gz
external_llvm-ac6f892ed0130543aa55a7891644c7599aacbb78.tar.bz2
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
-rw-r--r--include/llvm/CodeGen/MachineMemOperand.h5
-rw-r--r--lib/CodeGen/MachineInstr.cpp11
2 files changed, 12 insertions, 4 deletions
diff --git a/include/llvm/CodeGen/MachineMemOperand.h b/include/llvm/CodeGen/MachineMemOperand.h
index 5ab27e9..992d7d6 100644
--- a/include/llvm/CodeGen/MachineMemOperand.h
+++ b/include/llvm/CodeGen/MachineMemOperand.h
@@ -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,
diff --git a/lib/CodeGen/MachineInstr.cpp b/lib/CodeGen/MachineInstr.cpp
index fe78828..3025af9 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 <ostream>
using namespace llvm;
@@ -239,6 +240,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
//===----------------------------------------------------------------------===//