Skip to content

[Modules] Fix cyclic module dependencies in clang #102348

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

cachemeifyoucan
Copy link
Collaborator

Breakup the cyclic dependency in module 'Clang_Frontend':
Clang_Frontend -> Clang_Serialization -> Clang_Frontend

Created using spr 1.3.5
@llvmbot llvmbot added clang Clang issues not falling into any other category clang:modules C++20 modules and Clang Header Modules labels Aug 7, 2024
@llvmbot
Copy link
Member

llvmbot commented Aug 7, 2024

@llvm/pr-subscribers-clang-modules

@llvm/pr-subscribers-clang

Author: Steven Wu (cachemeifyoucan)

Changes

Breakup the cyclic dependency in module 'Clang_Frontend':
Clang_Frontend -> Clang_Serialization -> Clang_Frontend


Full diff: https://github.com/llvm/llvm-project/pull/102348.diff

1 Files Affected:

  • (modified) clang/include/clang/Serialization/ObjectFilePCHContainerReader.h (+1-1)
diff --git a/clang/include/clang/Serialization/ObjectFilePCHContainerReader.h b/clang/include/clang/Serialization/ObjectFilePCHContainerReader.h
index 6281a3f428869..06778d25d7e52 100644
--- a/clang/include/clang/Serialization/ObjectFilePCHContainerReader.h
+++ b/clang/include/clang/Serialization/ObjectFilePCHContainerReader.h
@@ -9,7 +9,7 @@
 #ifndef LLVM_CLANG_SERIALIZATION_OBJECTFILEPCHCONTAINERREADER_H
 #define LLVM_CLANG_SERIALIZATION_OBJECTFILEPCHCONTAINERREADER_H
 
-#include "clang/Frontend/PCHContainerOperations.h"
+#include "clang/Serialization/PCHContainerOperations.h"
 
 namespace clang {
 /// A PCHContainerReader implementation that uses LLVM to

@cachemeifyoucan
Copy link
Collaborator Author

Maybe the next step is to get rid of "clang/Frontend/PCHContainerOperations.h" but I don't know why it was there in the first place.

@cachemeifyoucan cachemeifyoucan changed the title [Modules] Fix cyclic dependencies in clang [Modules] Fix cyclic module dependencies in clang Aug 7, 2024
Copy link
Contributor

@jansvoboda11 jansvoboda11 left a comment

Choose a reason for hiding this comment

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

LGTM, would be great to do the follow-up you suggest.

@cachemeifyoucan cachemeifyoucan merged commit 61c0a6d into main Aug 7, 2024
10 checks passed
@cachemeifyoucan cachemeifyoucan deleted the users/cachemeifyoucan/spr/modules-fix-cyclic-dependencies-in-clang branch August 7, 2024 23:26
benlangmuir pushed a commit to benlangmuir/llvm-project that referenced this pull request Mar 10, 2025
Breakup the cyclic dependency in module 'Clang_Frontend':
Clang_Frontend -> Clang_Serialization -> Clang_Frontend

(cherry picked from commit 61c0a6d)
benlangmuir pushed a commit to benlangmuir/llvm-project that referenced this pull request Mar 10, 2025
Breakup the cyclic dependency in module 'Clang_Frontend':
Clang_Frontend -> Clang_Serialization -> Clang_Frontend

(cherry picked from commit 61c0a6d)
cyndyishida pushed a commit to swiftlang/llvm-project that referenced this pull request Mar 11, 2025
Breakup the cyclic dependency in module 'Clang_Frontend':
Clang_Frontend -> Clang_Serialization -> Clang_Frontend

(cherry picked from commit 61c0a6d)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:modules C++20 modules and Clang Header Modules clang Clang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants