commit | 6a883b086e46e9ffb05c874505dfec2d6f663bbe | [log] [tgz] |
---|---|---|
author | Rui Ueyama <ruiu@google.com> | Fri Aug 21 07:01:10 2015 +0000 |
committer | Rui Ueyama <ruiu@google.com> | Fri Aug 21 07:01:10 2015 +0000 |
tree | 67aafb72e6a385477fcc577a846898d376b5502b | |
parent | d2d2360222443981d17709a9175b44e7726b0bc8 [diff] [blame] |
COFF: Improve debug helper function. SectionChunk::getDebugName crashed if the symbol was a nullptr. llvm-svn: 245677
diff --git a/lld/COFF/Chunks.cpp b/lld/COFF/Chunks.cpp index ce2de5c..cbdfd55 100644 --- a/lld/COFF/Chunks.cpp +++ b/lld/COFF/Chunks.cpp
@@ -217,7 +217,9 @@ } StringRef SectionChunk::getDebugName() { - return Sym->getName(); + if (Sym) + return Sym->getName(); + return ""; } ArrayRef<uint8_t> SectionChunk::getContents() const {