Skip to content

Commit 2c4f938

Browse files
authored
Reapply #2 [clang-repl] [test] Make an XFAIL more precise (llvm#71168)
The const.cpp testcase fails when running in MSVC mode, while it does succeed in MinGW mode. In MSVC mode, there are more constructor invocations than expected, as the printout looks like this: A(1), this = 0000025597930000 A(1), this = 0000025597930000 f: this = 0000025597930000, val = 1 A(1), this = 0000025597930000 f: this = 0000025597930000, val = 1 ~A, this = 0000025597930000, val = 1 ~A, this = 0000025597930000, val = 1 ~A, this = 0000025597930000, val = 1 While the expected printout looks like this: A(1), this = 000002C903E10000 f: this = 000002C903E10000, val = 1 f: this = 000002C903E10000, val = 1 ~A, this = 000002C903E10000, val = 1 Reapplying llvm#70991 with the XFAIL changed to check the host triple, not the target triple. On an MSVC based build of Clang, but with the default target triple set to PS4/PS5, we will still see the failure. And a Linux based build of Clang that targets PS4/PS5 won't see the issue.
1 parent cab0a19 commit 2c4f938

File tree

3 files changed

+2
-5
lines changed

3 files changed

+2
-5
lines changed

clang/test/Interpreter/const.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// UNSUPPORTED: system-aix
22
// see https://github.com/llvm/llvm-project/issues/68092
3-
// XFAIL: system-windows
3+
// XFAIL: host={{.*}}-windows-msvc
44

55
// RUN: cat %s | clang-repl | FileCheck %s
66
// RUN: cat %s | clang-repl -Xcc -O2 | FileCheck %s

llvm/test/lit.cfg.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -477,10 +477,6 @@ def have_cxx_shared_library():
477477
if not config.target_triple.startswith(("nvptx", "xcore")):
478478
config.available_features.add("object-emission")
479479

480-
# Allow checking for specific details in the host triple
481-
if config.host_triple:
482-
config.available_features.add('host=%s' % config.host_triple)
483-
484480
if config.have_llvm_driver:
485481
config.available_features.add("llvm-driver")
486482

llvm/utils/lit/lit/llvm/config.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ def __init__(self, lit_config, config):
9797
# part of the standard header. But currently they aren't)
9898
host_triple = getattr(config, "host_triple", None)
9999
target_triple = getattr(config, "target_triple", None)
100+
features.add("host=%s" % host_triple)
100101
features.add("target=%s" % target_triple)
101102
if host_triple and host_triple == target_triple:
102103
features.add("native")

0 commit comments

Comments
 (0)