aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2023-04-04 21:52:56 +0200
committerTristan Gingold <tgingold@free.fr>2023-04-04 21:52:56 +0200
commit776731910064cb6df03be19d788f7f13b2f7d2f1 (patch)
tree04f5fbb21c4b95ece4845f2fa237be8232fb57db
parent57f33bd090fea44ec19734c9cf6ea53310a23ae3 (diff)
downloadghdl-776731910064cb6df03be19d788f7f13b2f7d2f1.tar.gz
ghdl-776731910064cb6df03be19d788f7f13b2f7d2f1.tar.bz2
ghdl-776731910064cb6df03be19d788f7f13b2f7d2f1.zip
llvm-cbinding.cpp: adjust for llvm 16
-rw-r--r--src/ortho/llvm6/llvm-cbindings.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/ortho/llvm6/llvm-cbindings.cpp b/src/ortho/llvm6/llvm-cbindings.cpp
index f15da2b43..91a28a789 100644
--- a/src/ortho/llvm6/llvm-cbindings.cpp
+++ b/src/ortho/llvm6/llvm-cbindings.cpp
@@ -1040,8 +1040,13 @@ new_type_decl(OIdent Ident, OTnode Atype)
OTnode Ptr = static_cast<OTnodeAccBase*>(Atype)->Acc;
// Possibly still incomplete
Atype->Dbg = DBuilder->createPointerType
- (Ptr ? Ptr->Dbg : nullptr,
- Atype->getBitSize(), 0, None, StringRef(Ident.cstr));
+ (Ptr ? Ptr->Dbg : nullptr, Atype->getBitSize(), 0,
+#if LLVM_VERSION_MAJOR >= 16
+ std::nullopt,
+#else
+ None,
+#endif
+ StringRef(Ident.cstr));
break;
}