Skip to content

Conversation

hjyamauchi
Copy link

@hjyamauchi hjyamauchi commented Aug 26, 2025

No description provided.

@hjyamauchi
Copy link
Author

@swift-ci please test llvm

@hjyamauchi
Copy link
Author

@swift-ci please test llvm

@hjyamauchi hjyamauchi force-pushed the cas2 branch 2 times, most recently from bfb2ee3 to da88ded Compare August 26, 2025 23:36
@hjyamauchi
Copy link
Author

@swift-ci please test llvm

@hjyamauchi
Copy link
Author

Unrelated test failures

 Failed Tests (19):
   Clang :: CodeGenCXX/ptrauth-explicit-vtable-pointer-control.cpp
   Clang :: Index/Store/record-hash-using.cpp
   Clang :: Refactor/FillInEnumSwitchCases/fill-in-cases-forward-decl.c
   Clang :: Refactor/FillInEnumSwitchCases/fill-in-cases-opaque-decl.cpp
   Clang :: Refactor/ImplementDeclaredMethods/implement-declared-methods.cpp
   Clang :: Refactor/Rename/CanonicalizeInstantiatedDecls.cpp
   Clang :: Refactor/Rename/ClassAsTemplateArgument.cpp
   Clang :: Refactor/Rename/ClassSimpleRenaming.cpp
   Clang :: Refactor/Rename/ComplicatedClassType.cpp
   Clang :: Refactor/Rename/Ctor.cpp
   Clang :: Refactor/Rename/MultiFileTU.cpp
   Clang :: Refactor/Rename/ProhibitedDeclarations.cpp
   Clang :: Refactor/Rename/TransparentTypedef.m
   Clang :: Refactor/Rename/TypedefTag.cpp
   Clang :: Refactor/Rename/UserDefinedConversion.cpp
   Clang :: Refactor/Rename/UsingDecl.cpp
   Clang :: Refactor/Rename/rename-initiate-usr.cpp
   Clang :: Refactor/Rename/rename-initiate.cpp
   LLVM :: CAS/LEB-mccas.ll

@hjyamauchi
Copy link
Author

This uses a path sanitizer inspired by https://github.com/swiftlang/swift/blob/main/utils/PathSanitizingFileCheck

@hjyamauchi hjyamauchi marked this pull request as ready for review August 27, 2025 17:06
@@ -250,6 +250,17 @@ def have_host_clang_repl_cuda():
)
)

config.substitutions.append(
(
"%path-sanitizer",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use the same approach as swift with %PathSanitizingFilecheck?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean overriding FileCheck as in https://github.com/swiftlang/swift/blob/5eb727b6684d54767813045a2821a10ba4958d22/test/lit.cfg#L3110 ? I don't think that would work here because the sanitize arguments differ per test, as opposed to fixed to BUILD_DIR/SOURCE_DIR and I don't want to affect other tests

If you mean using the same script file, it should work.

@@ -0,0 +1,55 @@
#!/usr/bin/env python3
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we share this with swift by any chance?

Copy link
Author

@hjyamauchi hjyamauchi Aug 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean using the same script file (having a single copy in clang and share it with swift)? If so, it may work. But I'm not clear on how files in the llvm-project repo is referred to from swift. Any example?

Copy link
Author

@hjyamauchi hjyamauchi Aug 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh except, it might be ugly/verbose to have extra args like --dry-run (to not run filecheck) if the identical script file is to be used

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, but having two different ways to do this seems unfortunate as well. I can see the argument for keeping it separate though - this is something that we will likely want to move into LLVM. However, if we can get PathSanitizingFileCheck to the point where it is usable, we could eventually just move that into LLVM and use that from there in Swift as well.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will see if I can use PathSanitizingFileCheck unmodified here in this PR though it might be verbose.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, updated to copy and use unmodified PathSanitizingFileCheck invoking FileCheck through it. I think it looks okay in the tests.

'"%s" %s %s'
% (
config.python_executable,
os.path.join(config.clang_src_dir, "utils", "PathSanitizingFileCheck"),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be nice to reference this from the swift repo if possible.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we can transition to having one copy in llvm

@hjyamauchi
Copy link
Author

@swift-ci please test llvm

@hjyamauchi
Copy link
Author

Unrelated test failures

 Failed Tests (18):
   Clang :: CodeGenCXX/ptrauth-explicit-vtable-pointer-control.cpp
   Clang :: Index/Store/record-hash-using.cpp
   Clang :: Refactor/FillInEnumSwitchCases/fill-in-cases-forward-decl.c
   Clang :: Refactor/ImplementDeclaredMethods/implement-declared-methods.cpp
   Clang :: Refactor/Rename/CanonicalizeInstantiatedDecls.cpp
   Clang :: Refactor/Rename/ClassAsTemplateArgument.cpp
   Clang :: Refactor/Rename/ClassSimpleRenaming.cpp
   Clang :: Refactor/Rename/ComplicatedClassType.cpp
   Clang :: Refactor/Rename/Ctor.cpp
   Clang :: Refactor/Rename/MultiFileTU.cpp
   Clang :: Refactor/Rename/ProhibitedDeclarations.cpp
   Clang :: Refactor/Rename/TransparentTypedef.m
   Clang :: Refactor/Rename/TypedefTag.cpp
   Clang :: Refactor/Rename/UserDefinedConversion.cpp
   Clang :: Refactor/Rename/UsingDecl.cpp
   Clang :: Refactor/Rename/rename-initiate-usr.cpp
   Clang :: Refactor/Rename/rename-initiate.cpp
   LLVM :: CAS/LEB-mccas.ll

@hjyamauchi hjyamauchi merged commit 152cf61 into swiftlang:next Aug 28, 2025
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants