MCRelocationInfo.cpp 1.0 KB

123456789101112131415161718192021222324252627282930
  1. //===-- MCRelocationInfo.cpp ----------------------------------------------===//
  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. #include "llvm/MC/MCDisassembler/MCRelocationInfo.h"
  9. #include "llvm-c/DisassemblerTypes.h"
  10. #include "llvm/MC/TargetRegistry.h"
  11. using namespace llvm;
  12. MCRelocationInfo::MCRelocationInfo(MCContext &Ctx) : Ctx(Ctx) {}
  13. MCRelocationInfo::~MCRelocationInfo() = default;
  14. const MCExpr *
  15. MCRelocationInfo::createExprForCAPIVariantKind(const MCExpr *SubExpr,
  16. unsigned VariantKind) {
  17. if (VariantKind != LLVMDisassembler_VariantKind_None)
  18. return nullptr;
  19. return SubExpr;
  20. }
  21. MCRelocationInfo *llvm::createMCRelocationInfo(const Triple &TT,
  22. MCContext &Ctx) {
  23. return new MCRelocationInfo(Ctx);
  24. }