mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Don't use SmallVector in MetadataReader.
Not all of its clients link in the necessary LLVM support libraries.
This commit is contained in:
@@ -1028,7 +1028,7 @@ private:
|
|||||||
buildNominalTypeDecl(ContextDescriptorRef descriptor) {
|
buildNominalTypeDecl(ContextDescriptorRef descriptor) {
|
||||||
// Build the demangling tree from the context tree.
|
// Build the demangling tree from the context tree.
|
||||||
Demangle::NodeFactory nodeFactory;
|
Demangle::NodeFactory nodeFactory;
|
||||||
SmallVector<std::pair<Demangle::Node::Kind, std::string>, 4>
|
std::vector<std::pair<Demangle::Node::Kind, std::string>>
|
||||||
nameComponents;
|
nameComponents;
|
||||||
ContextDescriptorRef parent = descriptor;
|
ContextDescriptorRef parent = descriptor;
|
||||||
|
|
||||||
@@ -1103,7 +1103,8 @@ private:
|
|||||||
return BuiltNominalTypeDecl();
|
return BuiltNominalTypeDecl();
|
||||||
if (nameComponents.back().first != Node::Kind::Module)
|
if (nameComponents.back().first != Node::Kind::Module)
|
||||||
return BuiltNominalTypeDecl();
|
return BuiltNominalTypeDecl();
|
||||||
auto moduleInfo = nameComponents.pop_back_val();
|
auto moduleInfo = std::move(nameComponents.back());
|
||||||
|
nameComponents.pop_back();
|
||||||
auto demangling =
|
auto demangling =
|
||||||
nodeFactory.createNode(Node::Kind::Module, moduleInfo.second);
|
nodeFactory.createNode(Node::Kind::Module, moduleInfo.second);
|
||||||
for (auto &component : reversed(nameComponents)) {
|
for (auto &component : reversed(nameComponents)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user