llvm-6502/include/llvm/MC/MCSection.h
Chris Lattner fcdbf4ecc3 create sections with MCSection::Create instead of Context->getOrCreateSection.
This is needed to allow polymorphic sections.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77680 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-31 16:43:49 +00:00

41 lines
1.2 KiB
C++

//===- MCSection.h - Machine Code Sections ----------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file declares the MCSection class.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_MC_MCSECTION_H
#define LLVM_MC_MCSECTION_H
#include <string>
#include "llvm/ADT/StringRef.h"
namespace llvm {
/// MCSection - Instances of this class represent a uniqued identifier for a
/// section in the current translation unit. The MCContext class uniques and
/// creates these.
class MCSection {
std::string Name;
private:
MCSection(const MCSection&); // DO NOT IMPLEMENT
void operator=(const MCSection&); // DO NOT IMPLEMENT
MCSection(const StringRef &_Name, MCContext &Ctx);
public:
static MCSection *Create(const StringRef &_Name, MCContext &Ctx);
const std::string &getName() const { return Name; }
};
} // end namespace llvm
#endif