This is an archive of the discontinued LLVM Phabricator instance.

[AsmParser][SystemZ][z/OS] Re-introduce HLASM comment syntax
ClosedPublic

Authored by anirudhp on Mar 19 2021, 7:02 PM.

Details

Summary
  • https://reviews.llvm.org/rGb605cfb336989705f391d255b7628062d3dfe9c3 was reverted due to sanitizer bugs in the introduced unit-test (specifically in the Address sanitizer https://lab.llvm.org/buildbot/#/builders/5/builds/5697)
  • This patch attempts to rectify that, as well as re-factor parts of the test
  • The issue was previously, within the setupCallToAsmParser function in the unit-test, SrcMgr was declared as a local variable. SrcMgr owns a unique pointer. Since the variable goes out of scope at the end of the function, the unique pointer is released.
  • This patch, moves the declaration of the SrcMgr variable to a class field, since the scope will remain until the class's destructor is invoked (which in this case is at the end of the unit test)
  • Furthermore, this patch also moves the MCContext Ctx declaration from a local variable instance inside a function, to a unique pointer class field. This ensures the instantiation of the MCContext remains until the tear down of the test.

Diff Detail

Event Timeline

anirudhp created this revision.Mar 19 2021, 7:02 PM
anirudhp requested review of this revision.Mar 19 2021, 7:02 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 19 2021, 7:02 PM
anirudhp edited the summary of this revision. (Show Details)Mar 19 2021, 7:06 PM
anirudhp edited the summary of this revision. (Show Details)Mar 19 2021, 7:10 PM

The new changes LGTM

This revision is now accepted and ready to land.Mar 22 2021, 8:16 AM