aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-jitlink/llvm-jitlink.cpp
diff options
context:
space:
mode:
authorNikita Popov <npopov@redhat.com>2024-01-22 10:33:50 +0100
committerNikita Popov <npopov@redhat.com>2024-01-22 10:37:18 +0100
commita43c192567eb4ea2535d73b83da5c7d5ed2b6122 (patch)
tree559352f8fc748daef666c2f196720cb049413808 /llvm/tools/llvm-jitlink/llvm-jitlink.cpp
parent5cd8d53cac00feafd739dba6215e1f6eed502e46 (diff)
downloadllvm-a43c192567eb4ea2535d73b83da5c7d5ed2b6122.zip
llvm-a43c192567eb4ea2535d73b83da5c7d5ed2b6122.tar.gz
llvm-a43c192567eb4ea2535d73b83da5c7d5ed2b6122.tar.bz2
[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.
Diffstat (limited to 'llvm/tools/llvm-jitlink/llvm-jitlink.cpp')
-rw-r--r--llvm/tools/llvm-jitlink/llvm-jitlink.cpp4
1 files changed, 2 insertions, 2 deletions
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 @@ Error Session::FileInfo::registerStubEntry(
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 @@ Error Session::FileInfo::registerMultiStubEntry(
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());