mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 19:52:54 +01:00
497f3f85f5
There is now a canonical symbol at the end of a section that different passes can request. This also allows us to assert that we don't switch back to a section whose end symbol has already been printed. llvm-svn: 233026
32 lines
939 B
C++
32 lines
939 B
C++
//===- lib/MC/MCSection.cpp - Machine Code Section Representation ---------===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "llvm/MC/MCSection.h"
|
|
#include "llvm/MC/MCAsmInfo.h"
|
|
#include "llvm/MC/MCContext.h"
|
|
#include "llvm/MC/MCSymbol.h"
|
|
#include "llvm/Support/raw_ostream.h"
|
|
using namespace llvm;
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
// MCSection
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
MCSymbol *MCSection::getEndSymbol(MCContext &Ctx) const {
|
|
if (!End)
|
|
End = Ctx.createTempSymbol("sec_end", true);
|
|
return End;
|
|
}
|
|
|
|
bool MCSection::hasEnded() const { return End && End->isInSection(); }
|
|
|
|
MCSection::~MCSection() {
|
|
}
|
|
|