Skip to content

Commit 21d4cfc

Browse files
committed
Fix build on LLVM-14.
Since it's so trivial to do unsure why LLVM-11 was listed as required, unless it's just historical baggage :-)
1 parent ea860e1 commit 21d4cfc

File tree

6 files changed

+13
-11
lines changed

6 files changed

+13
-11
lines changed

.gitmodules

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
[submodule "spdlog"]
22
path = spdlog
3-
url = git@github.com:gabime/spdlog.git
3+
url = https://github.com/gabime/spdlog.git
44
[submodule "json"]
55
path = json
6-
url = git@github.com:nlohmann/json.git
6+
url = https://github.com/nlohmann/json.git
77
[submodule "asttoc/fmt"]
88
path = asttoc/fmt
9-
url = git@github.com:fmtlib/fmt.git
9+
url = https://github.com/fmtlib/fmt.git

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ extern "C" {
145145

146146

147147
## Quick start
148-
You must have LLVM and clang 11.0.0 installed. To run the tests you'll need OpenEXR 2.5.5 installed. Other versions may work but the tests will fail as they rely on diffing the output, which will have the version numbers baked into the type names.
148+
You must have LLVM and clang 14.0.0 installed. To run the tests you'll need OpenEXR 2.5.5 installed. Other versions may work but the tests will fail as they rely on diffing the output, which will have the version numbers baked into the type names.
149149

150150
### Checkout
151151
The repository includes spdlog and nlohmann::json as submodules, so clone with `--recursive`:

astgen/src/ast_utils.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ mangle_template_args(const TemplateArgumentList& args) {
129129
result.push_back("NullPtr");
130130
} else if (arg.getKind() == TemplateArgument::ArgKind::Integral) {
131131
result.push_back(
132-
ps::replace(arg.getAsIntegral().toString(10), "-", "neg"));
132+
ps::replace(std::to_string(arg.getAsIntegral().getExtValue()), "-", "neg"));
133133
} else if (arg.getKind() == TemplateArgument::ArgKind::Template) {
134134
result.push_back("Template");
135135
} else if (arg.getKind() ==

astgen/src/astgen.cpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ static cl::list<std::string>
102102
int main(int argc_, const char** argv_) {
103103
// set up logging
104104
auto _console = spdlog::stdout_color_mt("console");
105-
std::string cwd = fs::current_path();
105+
const char* cwd = fs::current_path().c_str();
106106

107107
// FIXME: there's got to be a more sensible way of doing this but I can't
108108
// figure it out...
@@ -143,7 +143,8 @@ int main(int argc_, const char** argv_) {
143143
// grab any user-specified include directories from the command line
144144
cppmm::PROJECT_INCLUDES = parse_project_includes(argc, argv, cwd);
145145

146-
CommonOptionsParser OptionsParser(argc, argv, CppmmCategory);
146+
ExitOnError eoe;
147+
CommonOptionsParser OptionsParser = eoe(CommonOptionsParser::create(argc, argv, CppmmCategory));
147148

148149
// Set up logging
149150
switch (opt_verbosity) {

astgen/src/process_binding.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -811,7 +811,7 @@ void process_enum_decl(const EnumDecl* ed, std::string filename) {
811811
for (const auto& ecd : ed->enumerators()) {
812812
SPDLOG_DEBUG(" {}", ecd->getNameAsString());
813813
variants.push_back(std::make_pair(ecd->getNameAsString(),
814-
ecd->getInitVal().toString(10)));
814+
std::to_string(ecd->getInitVal().getExtValue())));
815815
}
816816

817817
std::vector<std::string> attrs = get_attrs(ed);
@@ -860,7 +860,7 @@ void process_library_enum_decl(const EnumDecl* ed, std::string filename,
860860
for (const auto& ecd : ed->enumerators()) {
861861
SPDLOG_DEBUG(" {}", ecd->getNameAsString());
862862
variants.push_back(std::make_pair(ecd->getNameAsString(),
863-
ecd->getInitVal().toString(10)));
863+
std::to_string(ecd->getInitVal().getExtValue())));
864864
}
865865

866866
NodeId new_id = NODES.size();

genbind/src/genbind.cpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -2026,7 +2026,7 @@ void process_enum_decl(const EnumDecl* ed, std::string filename) {
20262026
for (const auto& ecd : ed->enumerators()) {
20272027
SPDLOG_DEBUG(" {}", ecd->getNameAsString());
20282028
variants.push_back(std::make_pair(ecd->getNameAsString(),
2029-
ecd->getInitVal().toString(10)));
2029+
std::to_string(ecd->getInitVal().getExtValue())));
20302030
}
20312031

20322032
NodeId new_id = NODES.size();
@@ -2402,7 +2402,8 @@ int main(int argc_, const char** argv_) {
24022402

24032403
project_includes = parse_project_includes(argc, argv);
24042404

2405-
CommonOptionsParser OptionsParser(argc, argv, CppmmCategory);
2405+
ExitOnError eoe;
2406+
CommonOptionsParser OptionsParser = eoe(CommonOptionsParser::create(argc, argv, CppmmCategory));
24062407

24072408
switch (opt_verbosity) {
24082409
case 0:

0 commit comments

Comments
 (0)