[llvm] Handle Windows line endings in x86-fold-tables.td test (PR #112997)

Daniel Paoliello via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 18 16:15:37 PDT 2024


https://github.com/dpaoliello created https://github.com/llvm/llvm-project/pull/112997

The x86-fold-tables.td has been failing for me and in CI if Git happens to decide to check out the baseline file with Windows line endings.

This fix for this is to add the `--strip-trailing-cr` option to diff to normalize the line endings before comparing them.

>From e602e48438de46b81e10e0b5ef3b0dd9d67e0ce7 Mon Sep 17 00:00:00 2001
From: "Daniel Paoliello (HE/HIM)" <danpao at microsoft.com>
Date: Fri, 18 Oct 2024 16:14:12 -0700
Subject: [PATCH] Handle Windows line endings in x86-fold-tables.td test

---
 llvm/test/TableGen/x86-fold-tables.td | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/llvm/test/TableGen/x86-fold-tables.td b/llvm/test/TableGen/x86-fold-tables.td
index d6e59bea0000bd..b4edcf6bbfd1be 100644
--- a/llvm/test/TableGen/x86-fold-tables.td
+++ b/llvm/test/TableGen/x86-fold-tables.td
@@ -4,4 +4,4 @@
 //   2. cp <generated_file> x86-fold-tables.inc
 
 // RUN: llvm-tblgen -gen-x86-fold-tables -asmwriternum=1 %p/../../lib/Target/X86/X86.td -I %p/../../lib/Target/X86 -I %p/../../include -o %t
-// RUN: diff %p/x86-fold-tables.inc %t
+// RUN: diff --strip-trailing-cr %p/x86-fold-tables.inc %t



More information about the llvm-commits mailing list