blob: 001b8077cd3d1a07e5b7036fa3f774207474231c [file] [log] [blame]
Jason Liu0dc05722019-11-08 09:26:28 -05001//===-- llvm/BinaryFormat/XCOFF.cpp - The XCOFF file format -----*- C++/-*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#include "llvm/BinaryFormat/XCOFF.h"
10
11using namespace llvm;
12
13StringRef XCOFF::getMappingClassString(XCOFF::StorageMappingClass SMC) {
14 switch (SMC) {
15 case XCOFF::XMC_DS:
16 return "DS";
17 case XCOFF::XMC_RW:
18 return "RW";
19 case XCOFF::XMC_PR:
20 return "PR";
21 case XCOFF::XMC_TC0:
22 return "TC0";
23 case XCOFF::XMC_BS:
24 return "BS";
diggerlin3dfa9752019-11-15 11:30:19 -050025 case XCOFF::XMC_RO:
26 return "RO";
Jason Liu0dc05722019-11-08 09:26:28 -050027 default:
28 report_fatal_error("Unhandled storage-mapping class.");
29 }
30}