HomePhabricator

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

Authored by jdenny on Nov 18 2019, 7:22 AM.

Description

[Attr] Fix -ast-print for asm attribute

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.

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D70349

Details

Committed
jdennyNov 18 2019, 8:55 AM
Reviewer
aaron.ballman
Differential Revision
D70349: [Attr] Fix `-ast-print` for `asm` attribute
Parents
rG015b2e699f0c: [dwarfgen] Fix initialization order error. [NFCI]
Branches
Unknown
Tags
Unknown