1
//===- MCLabel.h - Machine Code Directional Local Labels --------*- C++ -*-===//
3
// The LLVM Compiler Infrastructure
5
// This file is distributed under the University of Illinois Open Source
6
// License. See LICENSE.TXT for details.
8
//===----------------------------------------------------------------------===//
10
// This file contains the declaration of the MCLabel class.
12
//===----------------------------------------------------------------------===//
14
#ifndef LLVM_MC_MCLABEL_H
15
#define LLVM_MC_MCLABEL_H
21
/// MCLabel - Instances of this class represent a label name in the MC file,
22
/// and MCLabel are created and unique'd by the MCContext class. MCLabel
23
/// should only be constructed for valid instances in the object file.
25
// Instance - the instance number of this Directional Local Label
28
private: // MCContext creates and uniques these.
29
friend class MCContext;
30
MCLabel(unsigned instance)
31
: Instance(instance) {}
33
MCLabel(const MCLabel&); // DO NOT IMPLEMENT
34
void operator=(const MCLabel&); // DO NOT IMPLEMENT
36
/// getInstance - Get the current instance of this Directional Local Label.
37
unsigned getInstance() const { return Instance; }
39
/// incInstance - Increment the current instance of this Directional Local
41
unsigned incInstance() { return ++Instance; }
43
/// print - Print the value to the stream \arg OS.
44
void print(raw_ostream &OS) const;
46
/// dump - Print the value to stderr.
50
inline raw_ostream &operator<<(raw_ostream &OS, const MCLabel &Label) {
54
} // end namespace llvm