1//===- MCLabel.h - Machine Code Directional Local Labels --------*- 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// This file contains the declaration of the MCLabel class. 11// 12//===----------------------------------------------------------------------===// 13 14#ifndef LLVM_MC_MCLABEL_H 15#define LLVM_MC_MCLABEL_H 16
| 1//===- MCLabel.h - Machine Code Directional Local Labels --------*- 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// This file contains the declaration of the MCLabel class. 11// 12//===----------------------------------------------------------------------===// 13 14#ifndef LLVM_MC_MCLABEL_H 15#define LLVM_MC_MCLABEL_H 16
|
| 17#include "llvm/Support/Compiler.h" 18
|
17namespace llvm { 18 class MCContext; 19 class raw_ostream; 20 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. 24 class MCLabel { 25 // Instance - the instance number of this Directional Local Label 26 unsigned Instance; 27 28 private: // MCContext creates and uniques these. 29 friend class MCContext; 30 MCLabel(unsigned instance) 31 : Instance(instance) {} 32
| 19namespace llvm { 20 class MCContext; 21 class raw_ostream; 22 23 /// MCLabel - Instances of this class represent a label name in the MC file, 24 /// and MCLabel are created and unique'd by the MCContext class. MCLabel 25 /// should only be constructed for valid instances in the object file. 26 class MCLabel { 27 // Instance - the instance number of this Directional Local Label 28 unsigned Instance; 29 30 private: // MCContext creates and uniques these. 31 friend class MCContext; 32 MCLabel(unsigned instance) 33 : Instance(instance) {} 34
|
33 MCLabel(const MCLabel&); // DO NOT IMPLEMENT 34 void operator=(const MCLabel&); // DO NOT IMPLEMENT
| 35 MCLabel(const MCLabel&) LLVM_DELETED_FUNCTION; 36 void operator=(const MCLabel&) LLVM_DELETED_FUNCTION;
|
35 public: 36 /// getInstance - Get the current instance of this Directional Local Label. 37 unsigned getInstance() const { return Instance; } 38 39 /// incInstance - Increment the current instance of this Directional Local 40 /// Label. 41 unsigned incInstance() { return ++Instance; } 42
| 37 public: 38 /// getInstance - Get the current instance of this Directional Local Label. 39 unsigned getInstance() const { return Instance; } 40 41 /// incInstance - Increment the current instance of this Directional Local 42 /// Label. 43 unsigned incInstance() { return ++Instance; } 44
|
43 /// print - Print the value to the stream \arg OS.
| 45 /// print - Print the value to the stream \p OS.
|
44 void print(raw_ostream &OS) const; 45 46 /// dump - Print the value to stderr. 47 void dump() const; 48 }; 49 50 inline raw_ostream &operator<<(raw_ostream &OS, const MCLabel &Label) { 51 Label.print(OS); 52 return OS; 53 } 54} // end namespace llvm 55 56#endif
| 46 void print(raw_ostream &OS) const; 47 48 /// dump - Print the value to stderr. 49 void dump() const; 50 }; 51 52 inline raw_ostream &operator<<(raw_ostream &OS, const MCLabel &Label) { 53 Label.print(OS); 54 return OS; 55 } 56} // end namespace llvm 57 58#endif
|