LLVM: lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp File Reference (original) (raw)
Go to the source code of this file.
| Macros | |
|---|---|
| #define | DEBUG_TYPE "mips-elf-object-writer" |
| Functions | |
|---|---|
| template<class InputIt, class OutputIt1, class OutputIt2, class UnaryPredicate> | |
| static std::pair< OutputIt1, OutputIt2 > | copy_if_else (InputIt First, InputIt Last, OutputIt1 d1, OutputIt2 d2, UnaryPredicate Predicate) |
| Copy elements in the range [First, Last) to d1 when the predicate is true or d2 when the predicate is false. | |
| template<class InputIt, class UnaryPredicate, class Comparator> | |
| static InputIt | find_best (InputIt First, InputIt Last, UnaryPredicate Predicate, Comparator BetterThan) |
| Find the best match in the range [First, Last). | |
| static unsigned | getMatchingLoType (const ELFRelocationEntry &Reloc) |
| Determine the low relocation that matches the given relocation. | |
| static bool | isMatchingReloc (unsigned MatchingType, const ELFRelocationEntry &R, const ELFRelocationEntry &X) |
◆ DEBUG_TYPE
#define DEBUG_TYPE "mips-elf-object-writer"
◆ copy_if_else()
template<class InputIt, class OutputIt1, class OutputIt2, class UnaryPredicate>
| std::pair< OutputIt1, OutputIt2 > copy_if_else ( InputIt First, InputIt Last, OutputIt1 d1, OutputIt2 d2, UnaryPredicate Predicate ) | static |
|---|
Copy elements in the range [First, Last) to d1 when the predicate is true or d2 when the predicate is false.
This is essentially both std::copy_if and std::remove_copy_if combined into a single pass.
Definition at line 71 of file MipsELFObjectWriter.cpp.
References llvm::First, I, and llvm::Last.
◆ find_best()
template<class InputIt, class UnaryPredicate, class Comparator>
| InputIt find_best ( InputIt First, InputIt Last, UnaryPredicate Predicate, Comparator BetterThan ) | static |
|---|
Find the best match in the range [First, Last).
An element matches when Predicate(X) returns FindBest_Match or FindBest_PerfectMatch. A value of FindBest_PerfectMatch also terminates the search. BetterThan(A, B) is a comparator that returns true when A is a better match than B. The return value is the position of the best match.
This is similar to std::find_if but finds the best of multiple possible matches.
Definition at line 97 of file MipsELFObjectWriter.cpp.
References llvm::First, I, and llvm::Last.
◆ getMatchingLoType()
Determine the low relocation that matches the given relocation.
If the relocation does not need a low relocation then the return value is ELF::R_MIPS_NONE.
The relocations that need a matching low part are R_(MIPS|MICROMIPS|MIPS16)_HI16 for all symbols and R_(MIPS|MICROMIPS|MIPS16)_GOT16 for local symbols only.
Definition at line 121 of file MipsELFObjectWriter.cpp.
References llvm::ELF::STB_LOCAL.