Skip to content

Commit 76bc1ed

Browse files
authored
[AA] Take account of C++23's stricter rules for forward declarations (NFC) (llvm#109416)
C++23 has stricter rules for forward declarations around std::unique_ptr, this means that the inline declaration of the constructor was failing under clang in C++23 mode, switching to an out-of-line definition of the constructor fixes this. This was fairly major impact as it blocked inclusion of a lot of headers under clang in C++23 mode. Fixes llvm#106597.
1 parent 6959ec9 commit 76bc1ed

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

llvm/include/llvm/Analysis/AliasAnalysis.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ class AAResults {
315315
public:
316316
// Make these results default constructable and movable. We have to spell
317317
// these out because MSVC won't synthesize them.
318-
AAResults(const TargetLibraryInfo &TLI) : TLI(TLI) {}
318+
AAResults(const TargetLibraryInfo &TLI);
319319
AAResults(AAResults &&Arg);
320320
~AAResults();
321321

llvm/lib/Analysis/AliasAnalysis.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ static cl::opt<bool> EnableAATrace("aa-trace", cl::Hidden, cl::init(false));
7373
static const bool EnableAATrace = false;
7474
#endif
7575

76+
AAResults::AAResults(const TargetLibraryInfo &TLI) : TLI(TLI) {}
77+
7678
AAResults::AAResults(AAResults &&Arg)
7779
: TLI(Arg.TLI), AAs(std::move(Arg.AAs)), AADeps(std::move(Arg.AADeps)) {}
7880

0 commit comments

Comments
 (0)