This is an archive of the discontinued LLVM Phabricator instance.

[Attr] Fix `-ast-print` for `asm` attribute
ClosedPublic

Authored by jdenny on Nov 15 2019, 3:47 PM.

Details

Summary

Without this fix, the tests introduced here produce the following
assert fail:

clang: /home/jdenny/llvm/clang/include/clang/Basic/AttributeCommonInfo.h:163: unsigned int clang::AttributeCommonInfo::getAttributeSpellingListIndex() const: Assertion `(isAttributeSpellingListCalculated() || AttrName) && "Spelling cannot be found"' failed.

The bug was introduced by D67368, which caused AsmLabelAttr's
spelling index to be set to SpellingNotCalculated.

Diff Detail

Event Timeline

jdenny created this revision.Nov 15 2019, 3:47 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 15 2019, 3:47 PM
This revision is now accepted and ready to land.Nov 17 2019, 11:03 AM
This revision was automatically updated to reflect the committed changes.