blob: 7204e6cba1f48f12471e100180cf3e244a880d79 [file] [log] [blame]
Chris Lattnerc10132a2009-07-31 17:02:00 +00001//===- lib/MC/MCSection.cpp - Machine Code Section Representation ---------===//
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#include "llvm/MC/MCSection.h"
Chris Lattner7b26fce2009-08-22 20:48:53 +000011#include "llvm/MC/MCAsmInfo.h"
Chandler Carruthed0881b2012-12-03 16:50:05 +000012#include "llvm/MC/MCContext.h"
Rafael Espindolaf2b408c2015-03-23 21:22:04 +000013#include "llvm/MC/MCSymbol.h"
Chris Lattner1cb93962009-08-08 22:41:53 +000014#include "llvm/Support/raw_ostream.h"
Chris Lattnerc10132a2009-07-31 17:02:00 +000015using namespace llvm;
16
Chris Lattner1cb93962009-08-08 22:41:53 +000017//===----------------------------------------------------------------------===//
18// MCSection
19//===----------------------------------------------------------------------===//
20
Rafael Espindola0709a7b2015-05-21 19:20:38 +000021MCSymbol *MCSection::getEndSymbol(MCContext &Ctx) {
Rafael Espindolaf2b408c2015-03-23 21:22:04 +000022 if (!End)
23 End = Ctx.createTempSymbol("sec_end", true);
24 return End;
25}
26
27bool MCSection::hasEnded() const { return End && End->isInSection(); }
28
Chris Lattnerc10132a2009-07-31 17:02:00 +000029MCSection::~MCSection() {
30}
31