-
Notifications
You must be signed in to change notification settings - Fork 15.2k
[llvm] Support building with c++23 #154372
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
Changes from 6 commits
4c8f57f
49f1a4c
f8ba12a
ddd4519
b48f2db
214772c
b922f74
d62570e
2a29c49
a801696
cafcfad
932c256
bc927ce
c813d7d
827a562
e20c9d2
fe60ac4
c50dede
455d96d
4d244dc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,7 @@ | |
#define LLVM_DEBUGINFO_PDB_PDBSYMBOLFUNC_H | ||
|
||
#include "llvm/DebugInfo/PDB/IPDBRawSymbol.h" | ||
#include "llvm/DebugInfo/PDB/PDBSymbolTypeFunctionSig.h" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The code generated by the macro at line 73:
Results in a unique_ptr to PDBSymbolTypeFunctionSig which is now a constexpr in c++23. Instead of importing the header here, it should also be possible to move the definition of the methods defined by the macro to the PDBSymbolFunc.cpp file where the complete type is known. Since there are so many methods defined with these macros in PDB, I didn't want to break the paradigm by moving the methods and only declaring them here in the header. |
||
#include "llvm/Support/Compiler.h" | ||
|
||
#include "PDBSymbol.h" | ||
|
@@ -21,7 +22,6 @@ namespace pdb { | |
|
||
class PDBSymDumper; | ||
class PDBSymbolData; | ||
class PDBSymbolTypeFunctionSig; | ||
template <typename ChildType> class IPDBEnumChildren; | ||
|
||
class LLVM_ABI PDBSymbolFunc : public PDBSymbol { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,9 +11,11 @@ | |
|
||
#include "PDBSymbol.h" | ||
#include "PDBTypes.h" | ||
#include "llvm/DebugInfo/PDB/IPDBLineNumber.h" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This include solves the above error when compiling against the c++23 standard. Similar to the case of |
||
#include "llvm/Support/Compiler.h" | ||
|
||
#include "llvm/DebugInfo/PDB/IPDBRawSymbol.h" | ||
#include "llvm/DebugInfo/PDB/PDBSymbolTypeBuiltin.h" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Similar to the case of #include "llvm/DebugInfo/PDB/IPDBLineNumber.h" above, this include also provides a complete type which is required in the expanded version of a below macro:
|
||
|
||
namespace llvm { | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar to the includes added for the other macros, this import provides a completed class declaration required for a unique_ptr which is generated by
FORWARD_SYMBOL_METHOD(getSrcLineOnTypeDefn)