summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2012-06-28 02:12:20 +0000
committerBill Wendling <isanbard@gmail.com>2012-06-28 02:12:20 +0000
commit74ac023cf6462e5dcfdf4b15a395de288fa70ebc (patch)
treeab3b80359d69226505cd7e7de7c13e7fc3cb5086 /llvm
parentecbe2e97954b6f6bb6093f3ce7e9bb7936cf7f9b (diff)
downloadbcm5719-llvm-74ac023cf6462e5dcfdf4b15a395de288fa70ebc.tar.gz
bcm5719-llvm-74ac023cf6462e5dcfdf4b15a395de288fa70ebc.zip
Don't output an empty string.
llvm-svn: 159327
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/VMCore/DebugInfo.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/VMCore/DebugInfo.cpp b/llvm/lib/VMCore/DebugInfo.cpp
index 4ca4c6f9614..4697fdecf3e 100644
--- a/llvm/lib/VMCore/DebugInfo.cpp
+++ b/llvm/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())
OpenPOWER on IntegriCloud