llvm-dwp: Add assert text
authorDavid Blaikie <dblaikie@gmail.com>
Wed, 13 Apr 2016 18:38:33 +0000 (18:38 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Wed, 13 Apr 2016 18:38:33 +0000 (18:38 +0000)
Post-commit feedback from Eric Christopher on r265452.

llvm-svn: 266225

llvm/tools/llvm-dwp/llvm-dwp.cpp

index de19eb9..40bea8e 100644 (file)
@@ -131,7 +131,9 @@ static const char *getIndexedString(uint32_t Form, DataExtractor InfoData,
                                     StringRef Str) {
   if (Form == dwarf::DW_FORM_string)
     return InfoData.getCStr(&InfoOffset);
-  assert(Form == dwarf::DW_FORM_GNU_str_index);
+  assert(Form == dwarf::DW_FORM_GNU_str_index && "Only string and str_index "
+                                                 "forms are supported for DWP "
+                                                 "string attributes");
   auto StrIndex = InfoData.getULEB128(&InfoOffset);
   DataExtractor StrOffsetsData(StrOffsets, true, 0);
   uint32_t StrOffsetsOffset = 4 * StrIndex;