summaryrefslogtreecommitdiffstats
path: root/gnu/llvm/lib/MC/MCSectionWasm.cpp
diff options
context:
space:
mode:
authorpatrick <patrick@openbsd.org>2020-08-03 15:06:44 +0000
committerpatrick <patrick@openbsd.org>2020-08-03 15:06:44 +0000
commitb64793999546ed8adebaeebd9d8345d18db8927d (patch)
tree4357c27b561d73b0e089727c6ed659f2ceff5f47 /gnu/llvm/lib/MC/MCSectionWasm.cpp
parentAdd support for UTF-8 DISPLAY-HINTs with octet length. For now only (diff)
downloadwireguard-openbsd-b64793999546ed8adebaeebd9d8345d18db8927d.tar.xz
wireguard-openbsd-b64793999546ed8adebaeebd9d8345d18db8927d.zip
Remove LLVM 8.0.1 files.
Diffstat (limited to 'gnu/llvm/lib/MC/MCSectionWasm.cpp')
-rw-r--r--gnu/llvm/lib/MC/MCSectionWasm.cpp96
1 files changed, 0 insertions, 96 deletions
diff --git a/gnu/llvm/lib/MC/MCSectionWasm.cpp b/gnu/llvm/lib/MC/MCSectionWasm.cpp
deleted file mode 100644
index 626027a24f9..00000000000
--- a/gnu/llvm/lib/MC/MCSectionWasm.cpp
+++ /dev/null
@@ -1,96 +0,0 @@
-//===- lib/MC/MCSectionWasm.cpp - Wasm 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/MCSectionWasm.h"
-#include "llvm/MC/MCAsmInfo.h"
-#include "llvm/MC/MCExpr.h"
-#include "llvm/MC/MCSymbol.h"
-#include "llvm/Support/raw_ostream.h"
-
-using namespace llvm;
-
-MCSectionWasm::~MCSectionWasm() {} // anchor.
-
-// Decides whether a '.section' directive
-// should be printed before the section name.
-bool MCSectionWasm::ShouldOmitSectionDirective(StringRef Name,
- const MCAsmInfo &MAI) const {
- return MAI.shouldOmitSectionDirective(Name);
-}
-
-static void printName(raw_ostream &OS, StringRef Name) {
- if (Name.find_first_not_of("0123456789_."
- "abcdefghijklmnopqrstuvwxyz"
- "ABCDEFGHIJKLMNOPQRSTUVWXYZ") == Name.npos) {
- OS << Name;
- return;
- }
- OS << '"';
- for (const char *B = Name.begin(), *E = Name.end(); B < E; ++B) {
- if (*B == '"') // Unquoted "
- OS << "\\\"";
- else if (*B != '\\') // Neither " or backslash
- OS << *B;
- else if (B + 1 == E) // Trailing backslash
- OS << "\\\\";
- else {
- OS << B[0] << B[1]; // Quoted character
- ++B;
- }
- }
- OS << '"';
-}
-
-void MCSectionWasm::PrintSwitchToSection(const MCAsmInfo &MAI, const Triple &T,
- raw_ostream &OS,
- const MCExpr *Subsection) const {
-
- if (ShouldOmitSectionDirective(SectionName, MAI)) {
- OS << '\t' << getSectionName();
- if (Subsection) {
- OS << '\t';
- Subsection->print(OS, &MAI);
- }
- OS << '\n';
- return;
- }
-
- OS << "\t.section\t";
- printName(OS, getSectionName());
- OS << ",\"";
-
- // TODO: Print section flags.
-
- OS << '"';
-
- OS << ',';
-
- // If comment string is '@', e.g. as on ARM - use '%' instead
- if (MAI.getCommentString()[0] == '@')
- OS << '%';
- else
- OS << '@';
-
- // TODO: Print section type.
-
- if (isUnique())
- OS << ",unique," << UniqueID;
-
- OS << '\n';
-
- if (Subsection) {
- OS << "\t.subsection\t";
- Subsection->print(OS, &MAI);
- OS << '\n';
- }
-}
-
-bool MCSectionWasm::UseCodeAlign() const { return false; }
-
-bool MCSectionWasm::isVirtualSection() const { return false; }