LLVM  10.0.0
XCOFF.cpp
Go to the documentation of this file.
1 //===-- 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 
10 
11 using namespace llvm;
12 
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";
25  case XCOFF::XMC_RO:
26  return "RO";
27  case XCOFF::XMC_UA:
28  return "UA";
29  case XCOFF::XMC_TC:
30  return "TC";
31  default:
32  report_fatal_error("Unhandled storage-mapping class.");
33  }
34 }
LLVM_ATTRIBUTE_NORETURN void report_fatal_error(Error Err, bool gen_crash_diag=true)
Report a serious error, calling any installed error handler.
Definition: Error.cpp:140
This class represents lattice values for constants.
Definition: AllocatorList.h:23
TOC Anchor for TOC Addressability.
Definition: XCOFF.h:44
Read Write Data.
Definition: XCOFF.h:43
Program Code.
Definition: XCOFF.h:31
StorageMappingClass
Storage Mapping Class definitions.
Definition: XCOFF.h:29
General TOC item.
Definition: XCOFF.h:45
StringRef getMappingClassString(XCOFF::StorageMappingClass SMC)
Definition: XCOFF.cpp:13
BSS class (uninitialized static internal)
Definition: XCOFF.h:49
Unclassified - Treated as Read Write.
Definition: XCOFF.h:48
Read Only Constant.
Definition: XCOFF.h:32
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:54
Descriptor csect.
Definition: XCOFF.h:47