From fc1c70a8a4f8bc7f4e51ece5b383966d602d89b7 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Thu, 28 Jun 2012 02:12:20 +0000 Subject: [PATCH 1/1] Don't output an empty string. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159327 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/VMCore/DebugInfo.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/VMCore/DebugInfo.cpp b/lib/VMCore/DebugInfo.cpp index 4ca4c6f9614..4697fdecf3e 100644 --- a/lib/VMCore/DebugInfo.cpp +++ b/lib/VMCore/DebugInfo.cpp @@ -1052,8 +1052,9 @@ void DIType::printInternal(raw_ostream &OS) const { << ", align " << getAlignInBits() << ", offset " << getOffsetInBits(); if (isBasicType()) - OS << ", enc " - << dwarf::AttributeEncodingString(DIBasicType(DbgNode).getEncoding()); + if (const char *Enc = + dwarf::AttributeEncodingString(DIBasicType(DbgNode).getEncoding())) + OS << ", enc " << Enc; OS << "]"; if (isPrivate()) -- 2.34.1