5f87f09694d89ed37d8534fdacbac84dbd5d2042
[oota-llvm.git] / include / llvm / MC / MCSymbol.h
1 //===- MCSymbol.h - Machine Code Symbols ------------------------*- 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 LLVM_MC_MCSYMBOL_H
11 #define LLVM_MC_MCSYMBOL_H
12
13 #include <string>
14
15 namespace llvm {
16   class MCSection;
17
18   class MCSymbol {
19     MCSection *Section;
20     std::string Name;
21     unsigned IsTemporary : 1;
22     unsigned IsExternal : 1;
23
24   public:
25     MCSymbol(const char *_Name, bool _IsTemporary) 
26       : Section(0), Name(_Name), IsTemporary(_IsTemporary), IsExternal(false) {}
27
28     MCSection *getSection() const { return Section; }
29     void setSection(MCSection *Value) { Section = Value; }
30
31     bool isExternal() const { return IsExternal; }
32     void setExternal(bool Value) { IsExternal = Value; }
33
34     const std::string &getName() const { return Name; }
35   };
36
37 } // end namespace llvm
38
39 #endif