MCRelocationInfo.cpp 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. //==-- MCRelocationInfo.cpp ------------------------------------------------==//
  2. //
  3. // The LLVM Compiler Infrastructure
  4. //
  5. // This file is distributed under the University of Illinois Open Source
  6. // License. See LICENSE.TXT for details.
  7. //
  8. //===----------------------------------------------------------------------===//
  9. #include "llvm/MC/MCRelocationInfo.h"
  10. #include "llvm-c/Disassembler.h"
  11. #include "llvm/Object/ObjectFile.h"
  12. #include "llvm/Support/TargetRegistry.h"
  13. using namespace llvm;
  14. MCRelocationInfo::MCRelocationInfo(MCContext &Ctx)
  15. : Ctx(Ctx) {
  16. }
  17. MCRelocationInfo::~MCRelocationInfo() {
  18. }
  19. const MCExpr *
  20. MCRelocationInfo::createExprForRelocation(object::RelocationRef Rel) {
  21. return nullptr;
  22. }
  23. const MCExpr *
  24. MCRelocationInfo::createExprForCAPIVariantKind(const MCExpr *SubExpr,
  25. unsigned VariantKind) {
  26. if (VariantKind != LLVMDisassembler_VariantKind_None)
  27. return nullptr;
  28. return SubExpr;
  29. }
  30. MCRelocationInfo *llvm::createMCRelocationInfo(const Triple &TT,
  31. MCContext &Ctx) {
  32. return new MCRelocationInfo(Ctx);
  33. }