~ubuntu-branches/ubuntu/feisty/clamav/feisty

« back to all changes in this revision

Viewing changes to libclamav/c++/llvm/lib/MC/MCValue.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Kees Cook
  • Date: 2007-02-20 10:33:44 UTC
  • mto: This revision was merged to the branch mainline in revision 16.
  • Revision ID: james.westby@ubuntu.com-20070220103344-zgcu2psnx9d98fpa
Tags: upstream-0.90
ImportĀ upstreamĀ versionĀ 0.90

Show diffs side-by-side

added added

removed removed

Lines of Context:
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
 
//===----------------------------------------------------------------------===//
9
 
 
10
 
#include "llvm/MC/MCValue.h"
11
 
#include "llvm/MC/MCExpr.h"
12
 
#include "llvm/Support/Debug.h"
13
 
#include "llvm/Support/raw_ostream.h"
14
 
 
15
 
using namespace llvm;
16
 
 
17
 
void MCValue::print(raw_ostream &OS, const MCAsmInfo *MAI) const {
18
 
  if (isAbsolute()) {
19
 
    OS << getConstant();
20
 
    return;
21
 
  }
22
 
 
23
 
  getSymA()->print(OS);
24
 
 
25
 
  if (getSymB()) {
26
 
    OS << " - ";
27
 
    getSymB()->print(OS);
28
 
  }
29
 
 
30
 
  if (getConstant())
31
 
    OS << " + " << getConstant();
32
 
}
33
 
 
34
 
void MCValue::dump() const {
35
 
  print(dbgs(), 0);
36
 
}