Eugene Zelenko | 3d8b0eb | 2017-02-08 22:23:19 +0000 | [diff] [blame] | 1 | //===- lib/MC/MCLabel.cpp - MCLabel implementation ------------------------===// |
Kevin Enderby | 0510b48 | 2010-05-17 23:08:19 +0000 | [diff] [blame] | 2 | // |
Chandler Carruth | 2946cd7 | 2019-01-19 08:50:56 +0000 | [diff] [blame] | 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 |
Kevin Enderby | 0510b48 | 2010-05-17 23:08:19 +0000 | [diff] [blame] | 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | |
| 9 | #include "llvm/MC/MCLabel.h" |
Nico Weber | 432a388 | 2018-04-30 14:59:11 +0000 | [diff] [blame] | 10 | #include "llvm/Config/llvm-config.h" |
Eugene Zelenko | 3d8b0eb | 2017-02-08 22:23:19 +0000 | [diff] [blame] | 11 | #include "llvm/Support/Compiler.h" |
Kevin Enderby | 0510b48 | 2010-05-17 23:08:19 +0000 | [diff] [blame] | 12 | #include "llvm/Support/Debug.h" |
| 13 | #include "llvm/Support/raw_ostream.h" |
Eugene Zelenko | 3d8b0eb | 2017-02-08 22:23:19 +0000 | [diff] [blame] | 14 | |
Kevin Enderby | 0510b48 | 2010-05-17 23:08:19 +0000 | [diff] [blame] | 15 | using namespace llvm; |
| 16 | |
| 17 | void MCLabel::print(raw_ostream &OS) const { |
| 18 | OS << '"' << getInstance() << '"'; |
| 19 | } |
| 20 | |
Aaron Ballman | 615eb47 | 2017-10-15 14:32:27 +0000 | [diff] [blame] | 21 | #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) |
Yaron Keren | eb2a254 | 2016-01-29 20:50:44 +0000 | [diff] [blame] | 22 | LLVM_DUMP_METHOD void MCLabel::dump() const { |
Kevin Enderby | 0510b48 | 2010-05-17 23:08:19 +0000 | [diff] [blame] | 23 | print(dbgs()); |
| 24 | } |
Matthias Braun | 8c209aa | 2017-01-28 02:02:38 +0000 | [diff] [blame] | 25 | #endif |