This is an archive of the discontinued LLVM Phabricator instance.

[clang] Itanium mangler constructors
ClosedPublic

Authored by urnathan on Feb 11 2022, 8:32 AM.

Details

Summary

The Itanium mangler constructors use both NSDMI and explicit member construction for default values. This is confusing.

*) Use NSDMIs wherever possible

*) Use forwarding ctor for the nesting case with an llvm::raw_null_ostream (and explicitly set NullOut flag in that ctor).

*) Copy the ModuleSubstitutions. This is a bug with no effect in the current mangling, but not in the newer mangling.

@ChuanquXi, the bug is possibly the cause of the crash you're encountering in the update module mangling patch. It would be good to be able to put a testcase in for that.

Diff Detail

Event Timeline

urnathan requested review of this revision.Feb 11 2022, 8:32 AM
urnathan created this revision.

LGTM. I would accept it after I am sure whether or not I could give the test case.

LGTM. I would accept it after I am sure whether or not I could give the test case.

Ok, let's give it a few days.

ChuanqiXu accepted this revision.Feb 15 2022, 6:06 PM

Sorry I failed to give a reduced test. I believe this patch should be fine.

This revision is now accepted and ready to land.Feb 15 2022, 6:06 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptFeb 16 2022, 4:31 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript