Go to the documentation of this file.
30 return make_error<CodeViewError>(
32 "Not enough bytes for a Cross Module Import Header!");
33 if (
auto EC = Reader.readObject(Item.
Header))
36 return make_error<CodeViewError>(
38 "Not enough to read specified number of Cross Module References!");
58 auto Result = Mappings.insert(std::make_pair(
Module, Targets));
60 Result.first->getValue().push_back(Targets[0]);
65 for (
const auto &Item : Mappings) {
74 using T = decltype(&*Mappings.begin());
76 Ids.reserve(Mappings.size());
78 for (
const auto &
M : Mappings)
86 for (
const auto &Item : Ids) {
89 Imp.
Count = Item->getValue().size();
This is an optimization pass for GlobalISel generic memory operations.
We currently emits eax Perhaps this is what we really should generate is Is imull three or four cycles eax eax The current instruction priority is based on pattern complexity The former is more complex because it folds a load so the latter will not be emitted Perhaps we should use AddedComplexity to give LEA32r a higher priority We should always try to match LEA first since the LEA matching code does some estimate to determine whether the match is profitable if we care more about code then imull is better It s two bytes shorter than movl leal On a Pentium M
Error initialize(BinaryStreamReader Reader)
Provides write only access to a subclass of WritableBinaryStream.
uint32_t insert(StringRef S)
static ErrorSuccess success()
Create a success value.
uint64_t bytesRemaining() const
Error writeArray(ArrayRef< T > Array)
Writes an array of objects of type T to the underlying stream, as if by using memcpy.
support::ulittle32_t ModuleNameOffset
FixedStreamArray< support::ulittle32_t > Imports
uint32_t calculateSerializedSize() const override
const CrossModuleImport * Header
support::ulittle32_t Count
Provides read only access to a subclass of BinaryStream.
detail::packed_endian_specific_integral< uint32_t, little, unaligned > ulittle32_t
A Module instance is used to store all the information related to an LLVM module.
Error commit(BinaryStreamWriter &Writer) const override
Error writeObject(const T &Obj)
Writes the object Obj to the underlying stream, as if by using memcpy.
StringRef - Represent a constant reference to a string, i.e.
Lightweight error class with error context and mandatory checking.
void sort(IteratorTy Start, IteratorTy End)
ArrayRef< T > makeArrayRef(const T &OneElt)
Construct an ArrayRef from a single element.
uint32_t getIdForString(StringRef S) const
Error readArray(ArrayRef< T > &Array, uint32_t NumElements)
Get a reference to a NumElements element array of objects of type T from the underlying stream as if ...
BinaryStreamRef is to BinaryStream what ArrayRef is to an Array.
void addImport(StringRef Module, uint32_t ImportId)