Skip to content

Commit 9d3ce55

Browse files
authored
[MC] Fix HIP buildbot errors after 68472a3 (#141138)
This fixes the errors on our HIP-Kokkos buildbot after 68472a3.
1 parent 778801c commit 9d3ce55

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUAsmBackend.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include "llvm/MC/MCFixupKindInfo.h"
1919
#include "llvm/MC/MCObjectWriter.h"
2020
#include "llvm/MC/MCSubtargetInfo.h"
21+
#include "llvm/MC/MCValue.h"
2122
#include "llvm/MC/TargetRegistry.h"
2223
#include "llvm/Support/EndianStream.h"
2324
#include "llvm/TargetParser/TargetParser.h"
@@ -51,6 +52,8 @@ class AMDGPUAsmBackend : public MCAsmBackend {
5152

5253
std::optional<MCFixupKind> getFixupKind(StringRef Name) const override;
5354
MCFixupKindInfo getFixupKindInfo(MCFixupKind Kind) const override;
55+
bool shouldForceRelocation(const MCAssembler &, const MCFixup &,
56+
const MCValue &, const MCSubtargetInfo *) override;
5457
};
5558

5659
} //End anonymous namespace
@@ -189,6 +192,13 @@ MCFixupKindInfo AMDGPUAsmBackend::getFixupKindInfo(MCFixupKind Kind) const {
189192
return Infos[Kind - FirstTargetFixupKind];
190193
}
191194

195+
bool AMDGPUAsmBackend::shouldForceRelocation(const MCAssembler &,
196+
const MCFixup &,
197+
const MCValue &Target,
198+
const MCSubtargetInfo *) {
199+
return Target.getSpecifier();
200+
}
201+
192202
unsigned AMDGPUAsmBackend::getMinimumNopSize() const {
193203
return 4;
194204
}

0 commit comments

Comments
 (0)