[clang] [Serialization] Fix lazy template loading (PR #133057)
Jonas Hahnfeld via cfe-commits
cfe-commits at lists.llvm.org
Tue May 13 06:00:22 PDT 2025
================
@@ -367,12 +367,6 @@ bool RedeclarableTemplateDecl::loadLazySpecializationsImpl(
if (!ExternalSource)
return false;
- // If TPL is not null, it implies that we're loading specializations for
- // partial templates. We need to load all specializations in such cases.
- if (TPL)
----------------
hahnjo wrote:
I tried to reproduce the problem, but it's not enough information about the setup yet. First, https://github.com/abseil/abseil-cpp/ doesn't have a `modulemap`, so I created one myself:
```
module absl {
module string {
module string_view {
header "install/include/absl/strings/string_view.h"
export *
}
module str_split {
header "install/include/absl/strings/str_split.h"
export *
}
}
}
```
Where do you get this from in your case and how do you compile the library + user code? The small snippet I tried was:
```c++
#include <absl/strings/string_view.h>
#include <absl/strings/str_split.h>
void test() {
std::vector<absl::string_view> views;
std::vector<absl::string_view>& x = views;
x = absl::StrSplit("abc", 'y');
}
```
> Unfortunately the error in Google3 doesn't go away after reverting https://github.com/llvm/llvm-project/commit/48f50c7385d79da320cdf52d3aabc83cc403ff9c.
Ok, was worth a shot. Is it possible to figure out which of the four commits causes the problems? Then at least we could get some information what is causing it.
https://github.com/llvm/llvm-project/pull/133057
More information about the cfe-commits
mailing list