From cfca06d7963fa0909f90483b42a6d7d194d01e08 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sun, 26 Jul 2020 19:36:28 +0000 Subject: Vendor import of llvm-project master 2e10b7a39b9, the last commit before the llvmorg-12-init tag, from which release/11.x was branched. --- llvm/lib/Object/COFFModuleDefinition.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'llvm/lib/Object/COFFModuleDefinition.cpp') diff --git a/llvm/lib/Object/COFFModuleDefinition.cpp b/llvm/lib/Object/COFFModuleDefinition.cpp index 64d4cf0efda2d..8f29f7a658fdd 100644 --- a/llvm/lib/Object/COFFModuleDefinition.cpp +++ b/llvm/lib/Object/COFFModuleDefinition.cpp @@ -229,14 +229,14 @@ private: Error parseExport() { COFFShortExport E; - E.Name = Tok.Value; + E.Name = std::string(Tok.Value); read(); if (Tok.K == Equal) { read(); if (Tok.K != Identifier) return createError("identifier expected, but got " + Tok.Value); E.ExtName = E.Name; - E.Name = Tok.Value; + E.Name = std::string(Tok.Value); } else { unget(); } @@ -285,7 +285,7 @@ private: } if (Tok.K == EqualEqual) { read(); - E.AliasTarget = Tok.Value; + E.AliasTarget = std::string(Tok.Value); if (Machine == IMAGE_FILE_MACHINE_I386 && !isDecorated(E.AliasTarget, MingwDef)) E.AliasTarget = std::string("_").append(E.AliasTarget); continue; @@ -315,7 +315,7 @@ private: Error parseName(std::string *Out, uint64_t *Baseaddr) { read(); if (Tok.K == Identifier) { - *Out = Tok.Value; + *Out = std::string(Tok.Value); } else { *Out = ""; unget(); -- cgit v1.2.3