diff options
author | Philipp Krones <philipp.krones@embecosm.com> | 2021-05-23 14:15:23 -0700 |
---|---|---|
committer | Fangrui Song <i@maskray.me> | 2021-05-23 14:15:23 -0700 |
commit | c2f819af73c54a8cf923e5a25099ca95dbe76312 (patch) | |
tree | 97a4ff834d4680ecbbd3f7c1fde1c749d2398f26 /llvm/tools/llvm-cfi-verify | |
parent | cb1511645170ec23036631790398d8143a832265 (diff) | |
download | llvm-c2f819af73c54a8cf923e5a25099ca95dbe76312.zip llvm-c2f819af73c54a8cf923e5a25099ca95dbe76312.tar.gz llvm-c2f819af73c54a8cf923e5a25099ca95dbe76312.tar.bz2 |
[MC] Refactor MCObjectFileInfo initialization and allow targets to create MCObjectFileInfo
This makes it possible for targets to define their own MCObjectFileInfo.
This MCObjectFileInfo is then used to determine things like section alignment.
This is a follow up to D101462 and prepares for the RISCV backend defining the
text section alignment depending on the enabled extensions.
Reviewed By: MaskRay
Differential Revision: https://reviews.llvm.org/D101921
Diffstat (limited to 'llvm/tools/llvm-cfi-verify')
-rw-r--r-- | llvm/tools/llvm-cfi-verify/lib/FileAnalysis.cpp | 2 | ||||
-rw-r--r-- | llvm/tools/llvm-cfi-verify/lib/FileAnalysis.h | 1 |
2 files changed, 1 insertions, 2 deletions
diff --git a/llvm/tools/llvm-cfi-verify/lib/FileAnalysis.cpp b/llvm/tools/llvm-cfi-verify/lib/FileAnalysis.cpp index 695a162..e1bca0d 100644 --- a/llvm/tools/llvm-cfi-verify/lib/FileAnalysis.cpp +++ b/llvm/tools/llvm-cfi-verify/lib/FileAnalysis.cpp @@ -408,7 +408,7 @@ Error FileAnalysis::initialiseDisassemblyMembers() { return make_error<UnsupportedDisassembly>("Failed to initialise MII."); Context.reset(new MCContext(Triple(TripleName), AsmInfo.get(), - RegisterInfo.get(), &MOFI, SubtargetInfo.get())); + RegisterInfo.get(), SubtargetInfo.get())); Disassembler.reset( ObjectTarget->createMCDisassembler(*SubtargetInfo, *Context)); diff --git a/llvm/tools/llvm-cfi-verify/lib/FileAnalysis.h b/llvm/tools/llvm-cfi-verify/lib/FileAnalysis.h index 27135c0..b256f7e 100644 --- a/llvm/tools/llvm-cfi-verify/lib/FileAnalysis.h +++ b/llvm/tools/llvm-cfi-verify/lib/FileAnalysis.h @@ -207,7 +207,6 @@ private: std::unique_ptr<const MCAsmInfo> AsmInfo; std::unique_ptr<MCSubtargetInfo> SubtargetInfo; std::unique_ptr<const MCInstrInfo> MII; - MCObjectFileInfo MOFI; std::unique_ptr<MCContext> Context; std::unique_ptr<const MCDisassembler> Disassembler; std::unique_ptr<const MCInstrAnalysis> MIA; |