blob: 66ee73c5bbb3e740a1afb55cf1bfb667df885139 [file] [log] [blame]
Eugene Zelenko3d8b0eb2017-02-08 22:23:19 +00001//===- lib/MC/MCLabel.cpp - MCLabel implementation ------------------------===//
Kevin Enderby0510b482010-05-17 23:08:19 +00002//
Chandler Carruth2946cd72019-01-19 08:50:56 +00003// 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
Kevin Enderby0510b482010-05-17 23:08:19 +00006//
7//===----------------------------------------------------------------------===//
8
9#include "llvm/MC/MCLabel.h"
Nico Weber432a3882018-04-30 14:59:11 +000010#include "llvm/Config/llvm-config.h"
Eugene Zelenko3d8b0eb2017-02-08 22:23:19 +000011#include "llvm/Support/Compiler.h"
Kevin Enderby0510b482010-05-17 23:08:19 +000012#include "llvm/Support/Debug.h"
13#include "llvm/Support/raw_ostream.h"
Eugene Zelenko3d8b0eb2017-02-08 22:23:19 +000014
Kevin Enderby0510b482010-05-17 23:08:19 +000015using namespace llvm;
16
17void MCLabel::print(raw_ostream &OS) const {
18 OS << '"' << getInstance() << '"';
19}
20
Aaron Ballman615eb472017-10-15 14:32:27 +000021#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
Yaron Kereneb2a2542016-01-29 20:50:44 +000022LLVM_DUMP_METHOD void MCLabel::dump() const {
Kevin Enderby0510b482010-05-17 23:08:19 +000023 print(dbgs());
24}
Matthias Braun8c209aa2017-01-28 02:02:38 +000025#endif