Move COFF Type in to the MCSymbolCOFF class.
[oota-llvm.git] / include / llvm / MC / MCSymbolCOFF.h
1 //===- MCSymbolCOFF.h -  ----------------------------------------*- 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 #ifndef LLVM_MC_MCSYMBOLCOFF_H
10 #define LLVM_MC_MCSYMBOLCOFF_H
11
12 #include "llvm/MC/MCSymbol.h"
13 #include "llvm/Support/COFF.h"
14
15 namespace llvm {
16 class MCSymbolCOFF : public MCSymbol {
17
18   /// This corresponds to the e_type field of the COFF symbol.
19   mutable uint16_t Type;
20
21 public:
22   MCSymbolCOFF(const StringMapEntry<bool> *Name, bool isTemporary)
23       : MCSymbol(SymbolKindCOFF, Name, isTemporary), Type(0) {}
24
25   uint16_t getType() const {
26     return Type;
27   }
28   void setType(uint16_t Ty) const {
29     Type = Ty;
30   }
31
32   static bool classof(const MCSymbol *S) { return S->isCOFF(); }
33 };
34 }
35
36 #endif