fixme resolved!
[oota-llvm.git] / lib / Target / X86 / X86MCTargetExpr.h
1 //===- X86MCTargetExpr.h - X86 Target Specific MCExpr -----------*- C++ -*-===//
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 #ifndef X86_MCTARGETEXPR_H
11 #define X86_MCTARGETEXPR_H
12
13 #include "llvm/MC/MCExpr.h"
14
15 namespace llvm {
16
17 /// X86MCTargetExpr - This class represents symbol variants, like foo@GOT.
18 class X86MCTargetExpr : public MCTargetExpr {
19 public:
20   enum VariantKind {
21     Invalid,
22     GOT,
23     GOTOFF,
24     GOTPCREL,
25     GOTTPOFF,
26     INDNTPOFF,
27     NTPOFF,
28     PLT,
29     TLSGD,
30     TPOFF
31   };
32 private:
33   /// Sym - The symbol being referenced.
34   const MCSymbol * const Sym;
35   /// Kind - The modifier.
36   const VariantKind Kind;
37   
38   X86MCTargetExpr(const MCSymbol *S, VariantKind K) : Sym(S), Kind(K) {}
39 public:
40   static X86MCTargetExpr *Create(const MCSymbol *Sym, VariantKind K,
41                                  MCContext &Ctx);
42   
43   void PrintImpl(raw_ostream &OS) const;
44   bool EvaluateAsRelocatableImpl(MCValue &Res) const;
45 };
46   
47 } // end namespace llvm
48
49 #endif