@@ -2122,7 +2125,10 @@ clang::CodeCompleteOptions
CodeCompleteOptions::getClangCompleteOpts() const {
// When an is used, Sema is responsible for completing the main file,
// the index can provide results from the preamble.
// Tell Sema not to deserialize the preamble to
@@ -52,6 +52,9 @@ struct CodeCompleteOptions {
/// For example, private members are usually inaccessible.
bool IncludeIneligibleResults = false;
+ /// Whether the experimental modules support are enabled.
+ bool ExperimentalModulesSupport = false;
Chuanq
https://github.com/ChuanqiXu9 updated
https://github.com/llvm/llvm-project/pull/110083
>From e35e600159c99736de7d2bc735c738002f592988 Mon Sep 17 00:00:00 2001
From: Chuanqi Xu
Date: Thu, 26 Sep 2024 13:43:51 +0800
Subject: [PATCH 1/6] [clangd] [C++20] [Modules] Support code complete for
C++20
https://github.com/ChuanqiXu9 closed
https://github.com/llvm/llvm-project/pull/110083
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1631,9 +1631,32 @@ static bool allLookupResultsAreTheSame(const
DeclContext::lookup_result &R) {
static NamedDecl* getLambdaCallOperatorHelper(const CXXRecordDecl &RD) {
if (!RD.isLambda()) return nullptr;
DeclarationName Name =
-RD.getASTContext().DeclarationNames
@@ -1631,9 +1631,32 @@ static bool allLookupResultsAreTheSame(const
DeclContext::lookup_result &R) {
static NamedDecl* getLambdaCallOperatorHelper(const CXXRecordDecl &RD) {
if (!RD.isLambda()) return nullptr;
DeclarationName Name =
-RD.getASTContext().DeclarationNames
https://github.com/ChuanqiXu9 commented:
Thanks for the analysis!
Further more, if we want to fix such issue better, may be we need to refactor
the current `lookup` method into a version that understands modules, then we
can do better lookup with modules. This is helpful for
https://github.co
https://github.com/ChuanqiXu9 edited
https://github.com/llvm/llvm-project/pull/110446
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,32 @@
+// RUN: rm -fR %t
+// RUN: split-file %s %t
+// RUN: cd %t
+// RUN: %clang_cc1 -verify -std=c++20 -fskip-odr-check-in-gmf
-emit-header-unit -xc++-user-header bz0.h
+// RUN: %clang_cc1 -verify -std=c++20 -fskip-odr-check-in-gmf
-emit-header-unit -xc++-user-heade
@@ -2527,7 +2527,7 @@ class BitsUnpacker {
inline bool shouldSkipCheckingODR(const Decl *D) {
return D->getASTContext().getLangOpts().SkipODRCheckInGMF &&
- D->isFromGlobalModule();
+ (D->isFromGlobalModule() || !D->isInNamedModule());
Chuanq
https://github.com/ChuanqiXu9 approved this pull request.
Thanks.
The underlying issue worths more investigating. But giving we don't have enough
developers on modules and RV, maybe this is the best thing we can do now.
https://github.com/llvm/llvm-project/pull/111360
_
https://github.com/ChuanqiXu9 commented:
I'll leave this to @cor3ntin
https://github.com/llvm/llvm-project/pull/110496
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ChuanqiXu9 edited
https://github.com/llvm/llvm-project/pull/110446
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1631,13 +1631,39 @@ static bool allLookupResultsAreTheSame(const
DeclContext::lookup_result &R) {
static NamedDecl* getLambdaCallOperatorHelper(const CXXRecordDecl &RD) {
if (!RD.isLambda()) return nullptr;
DeclarationName Name =
-RD.getASTContext().DeclarationName
https://github.com/ChuanqiXu9 approved this pull request.
Thanks. LGTM with nits.
https://github.com/llvm/llvm-project/pull/110446
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1631,13 +1631,39 @@ static bool allLookupResultsAreTheSame(const
DeclContext::lookup_result &R) {
static NamedDecl* getLambdaCallOperatorHelper(const CXXRecordDecl &RD) {
if (!RD.isLambda()) return nullptr;
DeclarationName Name =
-RD.getASTContext().DeclarationName
https://github.com/ChuanqiXu9 edited
https://github.com/llvm/llvm-project/pull/112371
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ChuanqiXu9 commented:
Took a pretty quick scanning and this looks good to me.
https://github.com/llvm/llvm-project/pull/112371
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cf
@@ -1183,7 +1181,7 @@ class Sema final : public SemaBase {
std::optional> CachedDarwinSDKInfo;
bool WarnedDarwinSDKInfoMissing = false;
- bool WarnedStackExhausted = false;
+ SingleWarningStackAwareExecutor StackAwareExecutor;
ChuanqiXu9 wrote:
Abstract
ChuanqiXu9 wrote:
I'd like to land this in 2 weeks if no more comments came in. Given:
- In our downstream, we've landed this patch for more than a year and it seems
running well. And also in the open source world, I tried to send it to
https://github.com/ChuanqiXu9/clangd-for-modules . Everyon
@@ -952,13 +952,15 @@ static void PrintPreprocessedTokens(Preprocessor &PP,
Token &Tok,
continue;
} else if (Tok.is(tok::annot_header_unit)) {
// This is a header-name that has been (effectively) converted into a
- // module-name.
+ // module-name, pr
https://github.com/ChuanqiXu9 updated
https://github.com/llvm/llvm-project/pull/83108
>From a2cac54ad725c18827226f74675312ace0239fa3 Mon Sep 17 00:00:00 2001
From: Vassil Vassilev
Date: Sun, 7 Jan 2018 15:16:11 +0200
Subject: [PATCH] D41416: [modules] [pch] Do not deserialize all lazy template
@@ -326,25 +326,25 @@ struct LazyOffsetPtr {
///
/// If the low bit is clear, a pointer to the AST node. If the low
/// bit is set, the upper 63 bits are the offset.
- mutable uint64_t Ptr = 0;
+ mutable uintptr_t Ptr = 0;
public:
LazyOffsetPtr() = default;
- exp
@@ -326,25 +326,25 @@ struct LazyOffsetPtr {
///
/// If the low bit is clear, a pointer to the AST node. If the low
/// bit is set, the upper 63 bits are the offset.
- mutable uint64_t Ptr = 0;
+ mutable uintptr_t Ptr = 0;
public:
LazyOffsetPtr() = default;
- exp
ChuanqiXu9 wrote:
> > > Can we remove `getAddressOfPointer` instead?. Where is it being used?
> >
> >
> > It is used in `VarDecl::getInitAddress()` in Decl.cpp. It looks like it is
> > used indirectly by the StmtIterator
>
> And that in turn is used in `StmtIterator`, and indeed we can end up
ChuanqiXu9 wrote:
> > @dmpolukhin I am still confusing about the problem. I mean, why your
> > previous patch will break the reproducer and why this patch can "fix" it? I
> > feel the current patch is somewhat workaround. It's not your fault. The
> > original codes are somewhat tricky already.
https://github.com/ChuanqiXu9 approved this pull request.
https://github.com/llvm/llvm-project/pull/112552
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
ChuanqiXu9 wrote:
> > Thanks for the analysis. I feel (2) is easier to me IIUC. I feel it is a
> > natural extension of your previous work. WDYT?
>
> I implemented this approach and it works. I tried to limit eager
> deserialization to the minimal set of functions (at the moment it is friend
ChuanqiXu9 wrote:
> > #112806 should address this without narrowing the field to 32 bits.
>
> As does [#111995
> (comment)](https://github.com/llvm/llvm-project/pull/111995#discussion_r1805329590),
> with less code and more generality
I prefer this solution too.
https://github.com/llvm/llvm-
@@ -326,25 +326,25 @@ struct LazyOffsetPtr {
///
/// If the low bit is clear, a pointer to the AST node. If the low
/// bit is set, the upper 63 bits are the offset.
- mutable uint64_t Ptr = 0;
+ mutable uintptr_t Ptr = 0;
public:
LazyOffsetPtr() = default;
- exp
https://github.com/ChuanqiXu9 approved this pull request.
LGTM. Thanks.
https://github.com/llvm/llvm-project/pull/112795
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ChuanqiXu9 approved this pull request.
LGTM now
https://github.com/llvm/llvm-project/pull/111662
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1341,9 +1341,22 @@ class ASTReader
serialization::InputFile getInputFile(ModuleFile &F, unsigned ID,
bool Complain = true);
+ /// Buffer we use as temporary storage backing resolved paths.
+ SmallString<256> PathBuf;
@@ -127,50 +128,64 @@ struct ModuleFile {
std::string ModuleFilePath;
};
-bool IsModuleFileUpToDate(
-PathRef ModuleFilePath,
-const PrerequisiteModules &RequisiteModules) {
-IntrusiveRefCntPtr Diags =
- CompilerInstance::createDiagnostics(new DiagnosticOptions(
https://github.com/ChuanqiXu9 updated
https://github.com/llvm/llvm-project/pull/113879
>From 99e1989c3b2fad7702795a707d130fe96a93f42f Mon Sep 17 00:00:00 2001
From: Chuanqi Xu
Date: Mon, 28 Oct 2024 15:54:37 +0800
Subject: [PATCH 1/2] [clangd] [Modules] Use ASTReader directly in
IsModuleFileUp
@@ -1341,9 +1341,22 @@ class ASTReader
serialization::InputFile getInputFile(ModuleFile &F, unsigned ID,
bool Complain = true);
+ /// Buffer we use as temporary storage backing resolved paths.
+ SmallString<256> PathBuf;
https://github.com/ChuanqiXu9 approved this pull request.
Looks better than
https://github.com/llvm/llvm-project/pull/113984
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ChuanqiXu9 updated
https://github.com/llvm/llvm-project/pull/113879
>From 99e1989c3b2fad7702795a707d130fe96a93f42f Mon Sep 17 00:00:00 2001
From: Chuanqi Xu
Date: Mon, 28 Oct 2024 15:54:37 +0800
Subject: [PATCH 1/4] [clangd] [Modules] Use ASTReader directly in
IsModuleFileUp
@@ -1341,9 +1341,22 @@ class ASTReader
serialization::InputFile getInputFile(ModuleFile &F, unsigned ID,
bool Complain = true);
+ /// Buffer we use as temporary storage backing resolved paths.
+ SmallString<256> PathBuf;
@@ -127,33 +127,39 @@ struct ModuleFile {
std::string ModuleFilePath;
};
-bool IsModuleFileUpToDate(PathRef ModuleFilePath,
- const PrerequisiteModules &RequisiteModules,
- llvm::IntrusiveRefCntPtr VFS)
{
+bool IsModuleFileU
https://github.com/ChuanqiXu9 created
https://github.com/llvm/llvm-project/pull/114193
Reproducer:
```
//--- a.cppm
export module a;
int func();
static int a = func();
//--- a.cpp
import a;
```
The `func()` should only execute once. However, before this patch we will
somehow import `static i
ChuanqiXu9 wrote:
Given the problem is very serious and the solution is pretty simple, I'd like
to backport this to 19.x.
https://github.com/llvm/llvm-project/pull/114193
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/c
ChuanqiXu9 wrote:
/cherry-pick 259eaa6878ead1e2e7ef572a874dc3d885c1899b
https://github.com/llvm/llvm-project/pull/114193
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ChuanqiXu9 closed
https://github.com/llvm/llvm-project/pull/114193
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -127,50 +128,65 @@ struct ModuleFile {
std::string ModuleFilePath;
};
-bool IsModuleFileUpToDate(
-PathRef ModuleFilePath,
-const PrerequisiteModules &RequisiteModules) {
-IntrusiveRefCntPtr Diags =
- CompilerInstance::createDiagnostics(new DiagnosticOptions(
@@ -127,50 +128,64 @@ struct ModuleFile {
std::string ModuleFilePath;
};
-bool IsModuleFileUpToDate(
-PathRef ModuleFilePath,
-const PrerequisiteModules &RequisiteModules) {
-IntrusiveRefCntPtr Diags =
- CompilerInstance::createDiagnostics(new DiagnosticOptions(
@@ -1341,9 +1341,22 @@ class ASTReader
serialization::InputFile getInputFile(ModuleFile &F, unsigned ID,
bool Complain = true);
+ /// Buffer we use as temporary storage backing resolved paths.
+ SmallString<256> PathBuf;
https://github.com/ChuanqiXu9 commented:
LGTM. Thanks
https://github.com/llvm/llvm-project/pull/113736
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1341,9 +1341,22 @@ class ASTReader
serialization::InputFile getInputFile(ModuleFile &F, unsigned ID,
bool Complain = true);
+ /// Buffer we use as temporary storage backing resolved paths.
+ SmallString<256> PathBuf;
https://github.com/ChuanqiXu9 milestoned
https://github.com/llvm/llvm-project/pull/114193
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -316,36 +287,169 @@ llvm::Error buildModuleFile(llvm::StringRef ModuleName,
if (Clang->getDiagnostics().hasErrorOccurred())
return llvm::createStringError("Compilation failed");
- BuiltModuleFiles.addModuleFile(ModuleName, Inputs.CompileCommand.Output);
- return llv
@@ -482,6 +482,42 @@ void func() {
EXPECT_EQ(Result.signatures[0].parameters[0].labelString, "int a");
}
+TEST_F(PrerequisiteModulesTests, ReusablePrerequisiteModulesTest) {
ChuanqiXu9 wrote:
Done by appending a new test.
https://github.com/llvm/llvm-proje
ChuanqiXu9 wrote:
> thanks I think this LG in terms of module-builder interfaces, but I think we
> can make some more changes to implementation to ensure it's easier to
> maintain going forward.
>
> speaking of maintenance, @HighCommander4 is definitely doing more of that
> than me recently.
https://github.com/ChuanqiXu9 created
https://github.com/llvm/llvm-project/pull/114948
This comes from an internal crash. I know generally it is better to reproduce
it first but I do feel the pattern is pretty risky. So I am wondering if we can
discuss it first. So maybe this is more of a disc
@@ -691,7 +691,7 @@ ensure it is reachable, e.g. ``using N::g;``.
Support for Reduced BMIs is still experimental, but it may become the default
in the future. The expected roadmap for Reduced BMIs as of Clang 19.x is:
ChuanqiXu9 wrote:
I looked up the dictionar
https://github.com/ChuanqiXu9 updated
https://github.com/llvm/llvm-project/pull/106683
>From 15aa6af1f5d22e4b837e8e2fd49469310ffbe7f1 Mon Sep 17 00:00:00 2001
From: Chuanqi Xu
Date: Fri, 30 Aug 2024 15:11:07 +0800
Subject: [PATCH 1/3] [clangd] [Modules] Support Reusable Modules Builder
---
cl
@@ -316,36 +287,169 @@ llvm::Error buildModuleFile(llvm::StringRef ModuleName,
if (Clang->getDiagnostics().hasErrorOccurred())
return llvm::createStringError("Compilation failed");
- BuiltModuleFiles.addModuleFile(ModuleName, Inputs.CompileCommand.Output);
- return llv
@@ -228,54 +223,30 @@ class StandalonePrerequisiteModules : public
PrerequisiteModules {
return BuiltModuleNames.contains(ModuleName);
}
- void addModuleFile(llvm::StringRef ModuleName,
- llvm::StringRef ModuleFilePath) {
-RequiredModules.emplac
@@ -228,54 +223,30 @@ class StandalonePrerequisiteModules : public
PrerequisiteModules {
return BuiltModuleNames.contains(ModuleName);
}
- void addModuleFile(llvm::StringRef ModuleName,
- llvm::StringRef ModuleFilePath) {
-RequiredModules.emplac
@@ -316,36 +287,169 @@ llvm::Error buildModuleFile(llvm::StringRef ModuleName,
if (Clang->getDiagnostics().hasErrorOccurred())
return llvm::createStringError("Compilation failed");
- BuiltModuleFiles.addModuleFile(ModuleName, Inputs.CompileCommand.Output);
- return llv
https://github.com/ChuanqiXu9 updated
https://github.com/llvm/llvm-project/pull/114382
>From f33e3bcd7d31742a37059a9d75fa58aa4d9ff36d Mon Sep 17 00:00:00 2001
From: Chuanqi Xu
Date: Thu, 31 Oct 2024 17:27:00 +0800
Subject: [PATCH 1/2] [C++20] [Modules] Convert
'-fexperimental-modules-reduced-b
@@ -556,6 +556,14 @@ def err_test_module_file_extension_format : Error<
def err_drv_module_output_with_multiple_arch : Error<
"option '-fmodule-output' can't be used with multiple arch options">;
+def warn_drv_module_reduced_bmi_not_enabled : Warning<
+ "reduced BMI is expe
https://github.com/ChuanqiXu9 updated
https://github.com/llvm/llvm-project/pull/114382
>From f33e3bcd7d31742a37059a9d75fa58aa4d9ff36d Mon Sep 17 00:00:00 2001
From: Chuanqi Xu
Date: Thu, 31 Oct 2024 17:27:00 +0800
Subject: [PATCH 1/3] [C++20] [Modules] Convert
'-fexperimental-modules-reduced-b
@@ -691,7 +691,7 @@ ensure it is reachable, e.g. ``using N::g;``.
Support for Reduced BMIs is still experimental, but it may become the default
in the future. The expected roadmap for Reduced BMIs as of Clang 19.x is:
ChuanqiXu9 wrote:
Done as suggested.
https
ChuanqiXu9 wrote:
> I think it's reasonable to do something similar here, but I believe the
> change for that should be inside GetOrCreateLLVMGlobal, not in
> GetAddrOfGlobalVar.
The problem to make it in `GetOrCreateLLVMGlobal` is that the argument of `Ty`
is not skippable. So the semantics
@@ -85,19 +85,20 @@ class PrerequisiteModules {
/// different versions and different source files.
class ModulesBuilder {
ChuanqiXu9 wrote:
Done
https://github.com/llvm/llvm-project/pull/106683
___
cfe-commits mailin
https://github.com/ChuanqiXu9 updated
https://github.com/llvm/llvm-project/pull/106683
>From 15aa6af1f5d22e4b837e8e2fd49469310ffbe7f1 Mon Sep 17 00:00:00 2001
From: Chuanqi Xu
Date: Fri, 30 Aug 2024 15:11:07 +0800
Subject: [PATCH] [clangd] [Modules] Support Reusable Modules Builder
---
clang-
@@ -85,19 +85,20 @@ class PrerequisiteModules {
/// different versions and different source files.
class ModulesBuilder {
public:
- ModulesBuilder(const GlobalCompilationDatabase &CDB) : CDB(CDB) {}
+ ModulesBuilder() = default;
+ virtual ~ModulesBuilder() = default;
Mo
https://github.com/ChuanqiXu9 updated
https://github.com/llvm/llvm-project/pull/106683
>From 15aa6af1f5d22e4b837e8e2fd49469310ffbe7f1 Mon Sep 17 00:00:00 2001
From: Chuanqi Xu
Date: Fri, 30 Aug 2024 15:11:07 +0800
Subject: [PATCH 1/2] [clangd] [Modules] Support Reusable Modules Builder
---
cl
@@ -338,17 +460,129 @@ ModulesBuilder::buildPrerequisiteModulesFor(PathRef File,
return std::move(RequiredModules);
}
-bool StandalonePrerequisiteModules::canReuse(
+ReusableModulesBuilder::ModuleBuildingSharedOwner
+ReusableModulesBuilder::getOrCreateModuleBuildingOwner(Str
https://github.com/ChuanqiXu9 created
https://github.com/llvm/llvm-project/pull/114365
Following of https://github.com/llvm/llvm-project/pull/106683
In that, if we open multiple tabs importing the same module, we're going to
build the same in the corresponding threads. This is not good. This p
https://github.com/ChuanqiXu9 edited
https://github.com/llvm/llvm-project/pull/106683
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ChuanqiXu9 created
https://github.com/llvm/llvm-project/pull/113879
@kadircet mentioned in
https://github.com/llvm/llvm-project/commit/448d8fa880be5cae0f63c3b248f07f647013a5a4#diff-fb3ba8a781117ff04736f951a274812cb7ad1678f9d71d4d91870b711ab45da0L285
that:
> this is definite
@@ -338,17 +460,129 @@ ModulesBuilder::buildPrerequisiteModulesFor(PathRef File,
return std::move(RequiredModules);
}
-bool StandalonePrerequisiteModules::canReuse(
+ReusableModulesBuilder::ModuleBuildingSharedOwner
+ReusableModulesBuilder::getOrCreateModuleBuildingOwner(Str
https://github.com/ChuanqiXu9 updated
https://github.com/llvm/llvm-project/pull/113879
>From 3df5e9275a63ee9c51c4e9e9a77383a93be020a4 Mon Sep 17 00:00:00 2001
From: Chuanqi Xu
Date: Mon, 28 Oct 2024 15:54:37 +0800
Subject: [PATCH 1/2] [clangd] [Modules] Add VFS to ASTUnit::LoadFromASTFile
---
@@ -85,19 +85,20 @@ class PrerequisiteModules {
/// different versions and different source files.
class ModulesBuilder {
public:
- ModulesBuilder(const GlobalCompilationDatabase &CDB) : CDB(CDB) {}
+ ModulesBuilder() = default;
+ virtual ~ModulesBuilder() = default;
Mo
@@ -85,19 +85,20 @@ class PrerequisiteModules {
/// different versions and different source files.
class ModulesBuilder {
ChuanqiXu9 wrote:
I didn't do it since in the last review, I was told we don't like forward
declaration in clangd. And if we can do that,
ChuanqiXu9 wrote:
(Update too quickly)
https://github.com/llvm/llvm-project/pull/113879
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ChuanqiXu9 updated
https://github.com/llvm/llvm-project/pull/113879
>From 99e1989c3b2fad7702795a707d130fe96a93f42f Mon Sep 17 00:00:00 2001
From: Chuanqi Xu
Date: Mon, 28 Oct 2024 15:54:37 +0800
Subject: [PATCH] [clangd] [Modules] Use ASTReader directly in
IsModuleFileUpToDa
https://github.com/ChuanqiXu9 edited
https://github.com/llvm/llvm-project/pull/113879
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
ChuanqiXu9 wrote:
> if you think that's fine, i think we can always create that astreader
> directly here, without a compilerinstance as well.
I like the idea more. (so I typed 'updated too quickly') The most important
reason I did the previous change is, I think the compiler invocation and
https://github.com/ChuanqiXu9 edited
https://github.com/llvm/llvm-project/pull/113879
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
ChuanqiXu9 wrote:
> I think the overall plan is fine, thanks for working on it!
>
> I think the idea of issuing a warning in order to get users to opt-in to a
> flag is somewhat novel. Have I missed discussion about this approach, versus
> simply changing the default?
I originally mentioned i
https://github.com/ChuanqiXu9 updated
https://github.com/llvm/llvm-project/pull/114382
>From f33e3bcd7d31742a37059a9d75fa58aa4d9ff36d Mon Sep 17 00:00:00 2001
From: Chuanqi Xu
Date: Thu, 31 Oct 2024 17:27:00 +0800
Subject: [PATCH 1/4] [C++20] [Modules] Convert
'-fexperimental-modules-reduced-b
@@ -316,36 +309,221 @@ llvm::Error buildModuleFile(llvm::StringRef ModuleName,
if (Clang->getDiagnostics().hasErrorOccurred())
return llvm::createStringError("Compilation failed");
- BuiltModuleFiles.addModuleFile(ModuleName, Inputs.CompileCommand.Output);
- return llv
@@ -124,10 +164,34 @@ struct ModuleFile {
llvm::sys::fs::remove(ModuleFilePath);
}
+ StringRef getModuleName() const { return ModuleName; }
+
+ StringRef getModuleFilePath() const { return ModuleFilePath; }
+
+private:
std::string ModuleName;
std::string Module
@@ -316,36 +294,205 @@ llvm::Error buildModuleFile(llvm::StringRef ModuleName,
if (Clang->getDiagnostics().hasErrorOccurred())
return llvm::createStringError("Compilation failed");
- BuiltModuleFiles.addModuleFile(ModuleName, Inputs.CompileCommand.Output);
- return llv
@@ -316,36 +287,169 @@ llvm::Error buildModuleFile(llvm::StringRef ModuleName,
if (Clang->getDiagnostics().hasErrorOccurred())
return llvm::createStringError("Compilation failed");
- BuiltModuleFiles.addModuleFile(ModuleName, Inputs.CompileCommand.Output);
- return llv
@@ -316,36 +294,205 @@ llvm::Error buildModuleFile(llvm::StringRef ModuleName,
if (Clang->getDiagnostics().hasErrorOccurred())
return llvm::createStringError("Compilation failed");
- BuiltModuleFiles.addModuleFile(ModuleName, Inputs.CompileCommand.Output);
- return llv
https://github.com/ChuanqiXu9 updated
https://github.com/llvm/llvm-project/pull/106683
>From 15aa6af1f5d22e4b837e8e2fd49469310ffbe7f1 Mon Sep 17 00:00:00 2001
From: Chuanqi Xu
Date: Fri, 30 Aug 2024 15:11:07 +0800
Subject: [PATCH 1/5] [clangd] [Modules] Support Reusable Modules Builder
---
cl
https://github.com/ChuanqiXu9 updated
https://github.com/llvm/llvm-project/pull/106683
>From 15aa6af1f5d22e4b837e8e2fd49469310ffbe7f1 Mon Sep 17 00:00:00 2001
From: Chuanqi Xu
Date: Fri, 30 Aug 2024 15:11:07 +0800
Subject: [PATCH 1/5] [clangd] [Modules] Support Reusable Modules Builder
---
cl
@@ -316,36 +309,221 @@ llvm::Error buildModuleFile(llvm::StringRef ModuleName,
if (Clang->getDiagnostics().hasErrorOccurred())
return llvm::createStringError("Compilation failed");
- BuiltModuleFiles.addModuleFile(ModuleName, Inputs.CompileCommand.Output);
- return llv
https://github.com/ChuanqiXu9 updated
https://github.com/llvm/llvm-project/pull/106683
>From 15aa6af1f5d22e4b837e8e2fd49469310ffbe7f1 Mon Sep 17 00:00:00 2001
From: Chuanqi Xu
Date: Fri, 30 Aug 2024 15:11:07 +0800
Subject: [PATCH 1/6] [clangd] [Modules] Support Reusable Modules Builder
---
cl
@@ -316,36 +295,187 @@ llvm::Error buildModuleFile(llvm::StringRef ModuleName,
if (Clang->getDiagnostics().hasErrorOccurred())
return llvm::createStringError("Compilation failed");
- BuiltModuleFiles.addModuleFile(ModuleName, Inputs.CompileCommand.Output);
- return llv
@@ -316,36 +295,187 @@ llvm::Error buildModuleFile(llvm::StringRef ModuleName,
if (Clang->getDiagnostics().hasErrorOccurred())
return llvm::createStringError("Compilation failed");
- BuiltModuleFiles.addModuleFile(ModuleName, Inputs.CompileCommand.Output);
- return llv
@@ -316,36 +295,187 @@ llvm::Error buildModuleFile(llvm::StringRef ModuleName,
if (Clang->getDiagnostics().hasErrorOccurred())
return llvm::createStringError("Compilation failed");
- BuiltModuleFiles.addModuleFile(ModuleName, Inputs.CompileCommand.Output);
- return llv
https://github.com/ChuanqiXu9 commented:
Thanks for reviewing!
https://github.com/llvm/llvm-project/pull/106683
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -316,36 +295,187 @@ llvm::Error buildModuleFile(llvm::StringRef ModuleName,
if (Clang->getDiagnostics().hasErrorOccurred())
return llvm::createStringError("Compilation failed");
- BuiltModuleFiles.addModuleFile(ModuleName, Inputs.CompileCommand.Output);
- return llv
https://github.com/ChuanqiXu9 updated
https://github.com/llvm/llvm-project/pull/106683
>From 15aa6af1f5d22e4b837e8e2fd49469310ffbe7f1 Mon Sep 17 00:00:00 2001
From: Chuanqi Xu
Date: Fri, 30 Aug 2024 15:11:07 +0800
Subject: [PATCH 1/7] [clangd] [Modules] Support Reusable Modules Builder
---
cl
https://github.com/ChuanqiXu9 edited
https://github.com/llvm/llvm-project/pull/106683
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
1801 - 1900 of 2375 matches
Mail list logo