aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/MC/MCSection.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/MC/MCSection.cpp')
-rw-r--r--llvm/lib/MC/MCSection.cpp28
1 files changed, 3 insertions, 25 deletions
diff --git a/llvm/lib/MC/MCSection.cpp b/llvm/lib/MC/MCSection.cpp
index 9367145..023f7f2 100644
--- a/llvm/lib/MC/MCSection.cpp
+++ b/llvm/lib/MC/MCSection.cpp
@@ -18,10 +18,10 @@
using namespace llvm;
-MCSection::MCSection(SectionVariant V, StringRef Name, bool IsText,
- bool IsVirtual, MCSymbol *Begin)
+MCSection::MCSection(SectionVariant V, StringRef Name, bool IsText, bool IsBss,
+ MCSymbol *Begin)
: Begin(Begin), HasInstructions(false), IsRegistered(false), IsText(IsText),
- IsVirtual(IsVirtual), LinkerRelaxable(false), Name(Name), Variant(V) {
+ IsBss(IsBss), LinkerRelaxable(false), Name(Name), Variant(V) {
// The initial subsection number is 0. Create a fragment list.
CurFragList = &Subsections.emplace_back(0u, FragList{}).second;
}
@@ -34,8 +34,6 @@ MCSymbol *MCSection::getEndSymbol(MCContext &Ctx) {
bool MCSection::hasEnded() const { return End && End->isInSection(); }
-StringRef MCSection::getVirtualSectionKind() const { return "virtual"; }
-
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
LLVM_DUMP_METHOD void MCSection::dump(
DenseMap<const MCFragment *, SmallVector<const MCSymbol *, 0>> *FragToSyms)
@@ -60,16 +58,6 @@ LLVM_DUMP_METHOD void MCSection::dump(
}
#endif
-void MCFragment::setContents(ArrayRef<char> Contents) {
- auto &S = getParent()->ContentStorage;
- if (ContentStart + Contents.size() > ContentEnd) {
- ContentStart = S.size();
- S.resize_for_overwrite(S.size() + Contents.size());
- }
- ContentEnd = ContentStart + Contents.size();
- llvm::copy(Contents, S.begin() + ContentStart);
-}
-
void MCFragment::setVarContents(ArrayRef<char> Contents) {
auto &S = getParent()->ContentStorage;
if (VarContentStart + Contents.size() > VarContentEnd) {
@@ -96,16 +84,6 @@ void MCFragment::appendFixups(ArrayRef<MCFixup> Fixups) {
FixupEnd = S.size();
}
-void MCFragment::setFixups(ArrayRef<MCFixup> Fixups) {
- auto &S = getParent()->FixupStorage;
- if (FixupStart + Fixups.size() > FixupEnd) {
- FixupStart = S.size();
- S.resize_for_overwrite(S.size() + Fixups.size());
- }
- FixupEnd = FixupStart + Fixups.size();
- llvm::copy(Fixups, S.begin() + FixupStart);
-}
-
void MCFragment::setVarFixups(ArrayRef<MCFixup> Fixups) {
auto &S = getParent()->FixupStorage;
if (VarFixupStart + Fixups.size() > VarFixupEnd) {