Skip to content

Commit d28a483

Browse files
aDifferentJTllvmbot
authored andcommitted
[AA] Take account of C++23's stricter rules for forward declarations (NFC) (#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 #106597. (cherry picked from commit 76bc1ed)
1 parent 6407583 commit d28a483

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
@@ -320,7 +320,7 @@ class AAResults {
320320
public:
321321
// Make these results default constructable and movable. We have to spell
322322
// these out because MSVC won't synthesize them.
323-
AAResults(const TargetLibraryInfo &TLI) : TLI(TLI) {}
323+
AAResults(const TargetLibraryInfo &TLI);
324324
AAResults(AAResults &&Arg);
325325
~AAResults();
326326

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)