[PATCH] D99004: [AsmParser][SystemZ][z/OS] Re-introduce HLASM comment syntax

Anirudh Prasad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 19 19:02:46 PDT 2021


anirudhp created this revision.
Herald added subscribers: hiraditya, mgorny.
anirudhp requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

- 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
- The issue was previously, within the `setupCallToAsmParser`, `SrcMgr` was declared as a local variable. `SrcMgr` owns a unique pointer. Since the variable goes out of scope, 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


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D99004

Files:
  llvm/include/llvm/MC/MCAsmInfo.h
  llvm/lib/MC/MCParser/AsmLexer.cpp
  llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmInfo.cpp
  llvm/unittests/MC/SystemZ/CMakeLists.txt
  llvm/unittests/MC/SystemZ/SystemZAsmLexerTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D99004.332058.patch
Type: text/x-patch
Size: 8104 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210320/6cf8d27d/attachment.bin>


More information about the llvm-commits mailing list