Skip to content

Commit cd39eae

Browse files
committed
MC: Merge MCFixupKindInfo.h into MCAsmBackend.h
... due to their close relationship. MCFixupKindInfo.h is a very simple header.
1 parent a49a5db commit cd39eae

File tree

3 files changed

+26
-43
lines changed

3 files changed

+26
-43
lines changed

llvm/include/llvm/MC/MCAsmBackend.h

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,31 @@ class raw_pwrite_stream;
3939
class StringRef;
4040
class raw_ostream;
4141

42+
/// Target independent information on a fixup kind.
43+
struct MCFixupKindInfo {
44+
enum FixupKindFlags {
45+
/// Should this fixup kind force a 4-byte aligned effective PC value?
46+
FKF_IsAlignedDownTo32Bits = (1 << 1),
47+
48+
/// Should this fixup be evaluated in a target dependent manner?
49+
FKF_IsTarget = (1 << 2),
50+
};
51+
52+
/// A target specific name for the fixup kind. The names will be unique for
53+
/// distinct kinds on any given target.
54+
const char *Name;
55+
56+
/// The bit offset to write the relocation into.
57+
uint8_t TargetOffset;
58+
59+
/// The number of bits written by this fixup. The bits are assumed to be
60+
/// contiguous.
61+
uint8_t TargetSize;
62+
63+
/// Flags describing additional information on this fixup kind.
64+
unsigned Flags;
65+
};
66+
4267
/// Generic interface to target specific assembler backends.
4368
class LLVM_ABI MCAsmBackend {
4469
protected: // Can only create subclasses.
Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +0,0 @@
1-
//===-- llvm/MC/MCFixupKindInfo.h - Fixup Descriptors -----------*- 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-
#ifndef LLVM_MC_MCFIXUPKINDINFO_H
10-
#define LLVM_MC_MCFIXUPKINDINFO_H
11-
12-
#include <cstdint>
13-
14-
namespace llvm {
15-
16-
/// Target independent information on a fixup kind.
17-
struct MCFixupKindInfo {
18-
enum FixupKindFlags {
19-
/// Should this fixup kind force a 4-byte aligned effective PC value?
20-
FKF_IsAlignedDownTo32Bits = (1 << 1),
21-
22-
/// Should this fixup be evaluated in a target dependent manner?
23-
FKF_IsTarget = (1 << 2),
24-
};
25-
26-
/// A target specific name for the fixup kind. The names will be unique for
27-
/// distinct kinds on any given target.
28-
const char *Name;
29-
30-
/// The bit offset to write the relocation into.
31-
uint8_t TargetOffset;
32-
33-
/// The number of bits written by this fixup. The bits are assumed to be
34-
/// contiguous.
35-
uint8_t TargetSize;
36-
37-
/// Flags describing additional information on this fixup kind.
38-
unsigned Flags;
39-
};
40-
41-
} // End llvm namespace
42-
43-
#endif

llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCFixups.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#ifndef LLVM_LIB_TARGET_SYSTEMZ_MCTARGETDESC_SYSTEMZMCFIXUPS_H
1010
#define LLVM_LIB_TARGET_SYSTEMZ_MCTARGETDESC_SYSTEMZMCFIXUPS_H
1111

12+
#include "llvm/MC/MCAsmBackend.h"
1213
#include "llvm/MC/MCFixup.h"
1314
#include "llvm/MC/MCFixupKindInfo.h"
1415

0 commit comments

Comments
 (0)