From 5646beae513b6d6247eee89d03bb62ac6e05ee6e Mon Sep 17 00:00:00 2001 From: Davide Italiano Date: Tue, 22 Sep 2015 02:14:43 +0000 Subject: [PATCH] [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 --- tools/llvm-readobj/MachODumper.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; -- 2.34.1