2009-06-23 22:01:43 +00:00
|
|
|
//===- MCSymbol.h - Machine Code Symbols ------------------------*- C++ -*-===//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef LLVM_MC_MCSYMBOL_H
|
|
|
|
#define LLVM_MC_MCSYMBOL_H
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
namespace llvm {
|
2009-06-30 01:49:52 +00:00
|
|
|
class MCSection;
|
|
|
|
|
2009-06-23 22:01:43 +00:00
|
|
|
class MCSymbol {
|
2009-06-24 17:00:42 +00:00
|
|
|
MCSection *Section;
|
2009-06-23 22:01:43 +00:00
|
|
|
std::string Name;
|
|
|
|
unsigned IsTemporary : 1;
|
2009-06-29 23:43:14 +00:00
|
|
|
unsigned IsExternal : 1;
|
2009-06-23 22:01:43 +00:00
|
|
|
|
|
|
|
public:
|
2009-06-24 17:00:42 +00:00
|
|
|
MCSymbol(const char *_Name, bool _IsTemporary)
|
2009-06-29 23:43:14 +00:00
|
|
|
: Section(0), Name(_Name), IsTemporary(_IsTemporary), IsExternal(false) {}
|
2009-06-24 01:03:06 +00:00
|
|
|
|
2009-06-24 17:00:42 +00:00
|
|
|
MCSection *getSection() const { return Section; }
|
|
|
|
void setSection(MCSection *Value) { Section = Value; }
|
2009-06-24 01:03:06 +00:00
|
|
|
|
2009-06-29 23:43:14 +00:00
|
|
|
bool isExternal() const { return IsExternal; }
|
|
|
|
void setExternal(bool Value) { IsExternal = Value; }
|
|
|
|
|
2009-06-24 17:00:42 +00:00
|
|
|
const std::string &getName() const { return Name; }
|
2009-06-23 22:01:43 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // end namespace llvm
|
|
|
|
|
|
|
|
#endif
|