From: Davide Italiano Date: Tue, 22 Sep 2015 02:14:43 +0000 (+0000) Subject: [llvm-readobj/MachO] Ensure we always have valid CmdName/SegmentName. X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=commitdiff_plain;h=5646beae513b6d6247eee89d03bb62ac6e05ee6e [llvm-readobj/MachO] Ensure we always have valid CmdName/SegmentName. Otherwise we might end up printing garbage while dumping. Differential Revision: http://reviews.llvm.org/D13041 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@248239 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/tools/llvm-readobj/MachODumper.cpp b/tools/llvm-readobj/MachODumper.cpp index 177f79fb9c1..ab77fdcf136 100644 --- a/tools/llvm-readobj/MachODumper.cpp +++ b/tools/llvm-readobj/MachODumper.cpp @@ -267,8 +267,8 @@ namespace { }; struct MachOSegment { - StringRef CmdName; - StringRef SegName; + std::string CmdName; + std::string SegName; uint64_t cmdsize; uint64_t vmaddr; uint64_t vmsize;