LLVM  15.0.0git
MCLabel.cpp
Go to the documentation of this file.
1 //===- lib/MC/MCLabel.cpp - MCLabel implementation ------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #include "llvm/MC/MCLabel.h"
10 #include "llvm/Config/llvm-config.h"
11 #include "llvm/Support/Compiler.h"
12 #include "llvm/Support/Debug.h"
14 
15 using namespace llvm;
16 
17 void MCLabel::print(raw_ostream &OS) const {
18  OS << '"' << getInstance() << '"';
19 }
20 
21 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
23  print(dbgs());
24 }
25 #endif
llvm::MCLabel::dump
void dump() const
Print the value to stderr.
Definition: MCLabel.cpp:22
LLVM_DUMP_METHOD
#define LLVM_DUMP_METHOD
Mark debug helper function definitions like dump() that should not be stripped from debug builds.
Definition: Compiler.h:494
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:17
llvm::MCLabel::print
void print(raw_ostream &OS) const
Print the value to the stream OS.
Definition: MCLabel.cpp:17
llvm::dbgs
raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
Definition: Debug.cpp:163
llvm::raw_ostream
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition: raw_ostream.h:54
llvm::MCLabel::getInstance
unsigned getInstance() const
Get the current instance of this Directional Local Label.
Definition: MCLabel.h:37
Compiler.h
raw_ostream.h
Debug.h
MCLabel.h