[PATCH] D90234: [MCParser] Correctly handle Windows line-endings when consuming lexed line comments

Stephen Tozer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 17 05:49:49 PDT 2021


StephenTozer added a comment.

As the test needs to have its CRLF line endings preserved, it needs to be checked into git as a binary file - unfortunately, this means that the contents of the file are not uploaded to phabricator. Instead, I'll paste the contents of the test file here. For context, the file is created exactly from the reproducer in the buzilla report above.

  	# RUN: llvm-mca %s
  	.text
  	.def	 @feat.00;
  	.scl	3;
  	.type	0;
  	.endef
  	.globl	@feat.00
  .set @feat.00, 0
  	.file	"repro.cpp"
  	.def	 "?foo@@YAHHH at Z";
  	.scl	2;
  	.type	32;
  	.endef
  	.globl	"?foo@@YAHHH at Z"                 # -- Begin function ?foo@@YAHHH at Z
  	.p2align	4, 0x90
  "?foo@@YAHHH at Z":                        # @"?foo@@YAHHH at Z"
  .seh_proc "?foo@@YAHHH at Z"
  # %bb.0:
  	pushq	%rax
  	.seh_stackalloc 8
  	.seh_endprologue
  	movl	%edx, 4(%rsp)
  	movl	%ecx, (%rsp)
  	#APP
  	# LLVM-MCA-BEGIN foo
  	#NO_APP
  	movl	(%rsp), %eax
  	addl	$42, %eax
  	movl	%eax, (%rsp)
  	#APP
  	# LLVM-MCA-END
  	#NO_APP
  	movl	4(%rsp), %eax
  	imull	(%rsp), %eax
  	movl	%eax, (%rsp)
  	movl	(%rsp), %eax
  	popq	%rcx
  	retq
  	.seh_endproc
                                          # -- End function
  	.addrsig


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D90234/new/

https://reviews.llvm.org/D90234



More information about the llvm-commits mailing list