Skip to content

Commit f35cb9d

Browse files
committed
Don't use SmallVector in MetadataReader.
Not all of its clients link in the necessary LLVM support libraries.
1 parent 75dcf27 commit f35cb9d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

include/swift/Remote/MetadataReader.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1028,7 +1028,7 @@ class MetadataReader {
10281028
buildNominalTypeDecl(ContextDescriptorRef descriptor) {
10291029
// Build the demangling tree from the context tree.
10301030
Demangle::NodeFactory nodeFactory;
1031-
SmallVector<std::pair<Demangle::Node::Kind, std::string>, 4>
1031+
std::vector<std::pair<Demangle::Node::Kind, std::string>>
10321032
nameComponents;
10331033
ContextDescriptorRef parent = descriptor;
10341034

@@ -1103,7 +1103,8 @@ class MetadataReader {
11031103
return BuiltNominalTypeDecl();
11041104
if (nameComponents.back().first != Node::Kind::Module)
11051105
return BuiltNominalTypeDecl();
1106-
auto moduleInfo = nameComponents.pop_back_val();
1106+
auto moduleInfo = std::move(nameComponents.back());
1107+
nameComponents.pop_back();
11071108
auto demangling =
11081109
nodeFactory.createNode(Node::Kind::Module, moduleInfo.second);
11091110
for (auto &component : reversed(nameComponents)) {

0 commit comments

Comments
 (0)