//===- MCLinkerOptimizationHint.h - LOH interface ---------------*- C++ -*-===// // // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // // This file declares some helpers classes to handle Linker Optimization Hint // (LOH). // // FIXME: LOH interface supports only MachO format at the moment. //===----------------------------------------------------------------------===// #ifndef LLVM_MC_MCLINKEROPTIMIZATIONHINT_H #define LLVM_MC_MCLINKEROPTIMIZATIONHINT_H #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/StringRef.h" #include "llvm/ADT/StringSwitch.h" #include <cassert> #include <cstdint> namespace llvm { class MachObjectWriter; class MCAssembler; class MCSymbol; class raw_ostream; /// Linker Optimization Hint Type. enum MCLOHType { … }; static inline StringRef MCLOHDirectiveName() { … } static inline bool isValidMCLOHType(unsigned Kind) { … } static inline int MCLOHNameToId(StringRef Name) { … } static inline StringRef MCLOHIdToName(MCLOHType Kind) { … } static inline int MCLOHIdToNbArgs(MCLOHType Kind) { … } /// Store Linker Optimization Hint information (LOH). class MCLOHDirective { … }; class MCLOHContainer { … }; // Add types for specialized template using MCSymbol. MCLOHArgs; MCLOHDirectives; } // end namespace llvm #endif // LLVM_MC_MCLINKEROPTIMIZATIONHINT_H