aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Object/WindowsResource.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Object/WindowsResource.cpp')
-rw-r--r--llvm/lib/Object/WindowsResource.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Object/WindowsResource.cpp b/llvm/lib/Object/WindowsResource.cpp
index 1071771..0cf9da4 100644
--- a/llvm/lib/Object/WindowsResource.cpp
+++ b/llvm/lib/Object/WindowsResource.cpp
@@ -346,7 +346,7 @@ Error WindowsResourceParser::parse(WindowsResource *WR,
ResourceEntryRef Entry = EntryOrErr.get();
uint32_t Origin = InputFilenames.size();
- InputFilenames.push_back(WR->getFileName());
+ InputFilenames.push_back(std::string(WR->getFileName()));
bool End = false;
while (!End) {
@@ -368,7 +368,7 @@ Error WindowsResourceParser::parse(ResourceSectionRef &RSR, StringRef Filename,
std::vector<std::string> &Duplicates) {
UNWRAP_REF_OR_RETURN(BaseTable, RSR.getBaseTable());
uint32_t Origin = InputFilenames.size();
- InputFilenames.push_back(Filename);
+ InputFilenames.push_back(std::string(Filename));
std::vector<StringOrID> Context;
return addChildren(Root, RSR, BaseTable, Origin, Context, Duplicates);
}