add a new MachineModuleInfoMachO class, which is the per-module
[llvm/avr.git] / lib / MC / MCValue.cpp
blob69bd10c8e699dab1cf38b103687b53d1888c49e5
1 //===- lib/MC/MCValue.cpp - MCValue implementation ------------------------===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
10 #include "llvm/MC/MCValue.h"
11 #include "llvm/Support/raw_ostream.h"
13 using namespace llvm;
15 void MCValue::print(raw_ostream &OS, const MCAsmInfo *MAI) const {
16 if (isAbsolute()) {
17 OS << getConstant();
18 return;
21 getSymA()->print(OS, MAI);
23 if (getSymB()) {
24 OS << " - ";
25 getSymB()->print(OS, MAI);
28 if (getConstant())
29 OS << " + " << getConstant();
32 void MCValue::dump() const {
33 print(errs(), 0);