xref: /freebsd/contrib/llvm-project/llvm/lib/MC/MCLabel.cpp (revision e8d8bef961a50d4dc22501cde4fb9fb0be1b2532)
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"
13 #include "llvm/Support/raw_ostream.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)
22 LLVM_DUMP_METHOD void MCLabel::dump() const {
23   print(dbgs());
24 }
25 #endif
26