ARMErrataFix.h revision 360784
1//===- ARMErrataFix.h -------------------------------------------*- 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 LLD_ELF_ARMA8ERRATAFIX_H 10#define LLD_ELF_ARMA8ERRATAFIX_H 11 12#include "lld/Common/LLVM.h" 13#include "llvm/ADT/DenseMap.h" 14#include <map> 15#include <vector> 16 17namespace lld { 18namespace elf { 19 20class Defined; 21class InputSection; 22struct InputSectionDescription; 23class OutputSection; 24class Patch657417Section; 25 26class ARMErr657417Patcher { 27public: 28 // Return true if Patches have been added to the OutputSections. 29 bool createFixes(); 30 31private: 32 std::vector<Patch657417Section *> 33 patchInputSectionDescription(InputSectionDescription &isd); 34 35 void insertPatches(InputSectionDescription &isd, 36 std::vector<Patch657417Section *> &patches); 37 38 void init(); 39 40 // A cache of the mapping symbols defined by the InputSection sorted in order 41 // of ascending value with redundant symbols removed. These describe 42 // the ranges of code and data in an executable InputSection. 43 llvm::DenseMap<InputSection *, std::vector<const Defined *>> sectionMap; 44 45 bool initialized = false; 46}; 47 48} // namespace elf 49} // namespace lld 50 51#endif 52