diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2020-07-26 19:36:28 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2020-07-26 19:36:28 +0000 |
commit | cfca06d7963fa0909f90483b42a6d7d194d01e08 (patch) | |
tree | 209fb2a2d68f8f277793fc8df46c753d31bc853b /llvm/lib/Object/COFFModuleDefinition.cpp | |
parent | 706b4fc47bbc608932d3b491ae19a3b9cde9497b (diff) |
Notes
Diffstat (limited to 'llvm/lib/Object/COFFModuleDefinition.cpp')
-rw-r--r-- | llvm/lib/Object/COFFModuleDefinition.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Object/COFFModuleDefinition.cpp b/llvm/lib/Object/COFFModuleDefinition.cpp index 64d4cf0efda2..8f29f7a658fd 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(); |