[flang][driver]Fix broken flang-new mlir test

The test was added as a .mlir file, and this extension is not
in the lit.cfg.py, so it was never run. When running it, the
file would produce an error, as semicolon is not an MLIR comment.

This adds the extension and fixes the comment start by using C++
style comments.

Reviewed By: awarzynski

Differential Revision: https://reviews.llvm.org/D133792
This commit is contained in:
Mats Petersson 2022-09-13 18:04:01 +01:00
parent 244a6a76d9
commit b36b27b3fc
2 changed files with 6 additions and 7 deletions

View File

@ -1,10 +1,9 @@
; Verify that the driver can consume MLIR/FIR files. // Verify that the driver can consume MLIR/FIR files.
; RUN: %flang_fc1 -S %s -o - | FileCheck %s // RUN: %flang_fc1 -S %s -o - | FileCheck %s
; CHECK-LABEL: foo:
; CHECK: ret
// CHECK-LABEL: foo:
// CHECK: ret
func.func @foo() { func.func @foo() {
return return
} }

View File

@ -27,8 +27,8 @@ config.test_format = lit.formats.ShTest(not llvm_config.use_lit_shell)
# suffixes: A list of file extensions to treat as test files. # suffixes: A list of file extensions to treat as test files.
config.suffixes = ['.c', '.cpp', '.f', '.F', '.ff', '.FOR', '.for', '.f77', '.f90', '.F90', config.suffixes = ['.c', '.cpp', '.f', '.F', '.ff', '.FOR', '.for', '.f77', '.f90', '.F90',
'.ff90', '.f95', '.F95', '.ff95', '.fpp', '.FPP', '.cuf' '.ff90', '.f95', '.F95', '.ff95', '.fpp', '.FPP', '.cuf'
'.CUF', '.f18', '.F18', '.fir', '.f03', '.F03', '.f08', '.CUF', '.f18', '.F18', '.f03', '.F03', '.f08', '.F08',
'.F08', '.ll'] '.ll', '.fir', '.mlir']
config.substitutions.append(('%PATH%', config.environment['PATH'])) config.substitutions.append(('%PATH%', config.environment['PATH']))
config.substitutions.append(('%llvmshlibdir', config.llvm_shlib_dir)) config.substitutions.append(('%llvmshlibdir', config.llvm_shlib_dir))