[llvm-jitlink] Use SmallVectorImpl when referencing StubInfos (NFC) The element type is declared as SmallVector<T, 1>, but we assign to SmallVector<T> &. These types are not the same on 32-bit systems, resulting in a compilation error. Fix this by using SmallVectorImpl<T> & instead, which is independent of the small size.
diff --git a/llvm/tools/llvm-jitlink/llvm-jitlink.cpp b/llvm/tools/llvm-jitlink/llvm-jitlink.cpp index d233ebd..7e21377 100644 --- a/llvm/tools/llvm-jitlink/llvm-jitlink.cpp +++ b/llvm/tools/llvm-jitlink/llvm-jitlink.cpp
@@ -1212,7 +1212,7 @@ if (!TS) return TS.takeError(); - SmallVector<MemoryRegionInfo> &Entry = StubInfos[TS->getName()]; + SmallVectorImpl<MemoryRegionInfo> &Entry = StubInfos[TS->getName()]; Entry.insert(Entry.begin(), {Sym.getSymbolContent(), Sym.getAddress().getValue(), Sym.getTargetFlags()}); @@ -1230,7 +1230,7 @@ if (!Target) return Target.takeError(); - SmallVector<MemoryRegionInfo> &Entry = StubInfos[Target->getName()]; + SmallVectorImpl<MemoryRegionInfo> &Entry = StubInfos[Target->getName()]; Entry.emplace_back(Sym.getSymbolContent(), Sym.getAddress().getValue(), Sym.getTargetFlags());