summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-12-09 19:42:35 (GMT)
committerBrad King <brad.king@kitware.com>2019-12-09 21:50:39 (GMT)
commit64e02a04b16cab23b2ac9efd206024f3f79a185e (patch)
tree1564b32ad089c13dce747f238341a438f332019a /src
parent17e2df52caed3945db1083f1319b1fa27e9dea34 (diff)
downloadCastXML-64e02a04b16cab23b2ac9efd206024f3f79a185e.zip
CastXML-64e02a04b16cab23b2ac9efd206024f3f79a185e.tar.gz
CastXML-64e02a04b16cab23b2ac9efd206024f3f79a185e.tar.bz2
Port to LLVM/Clang SVN r375505 (trunk)
Clang renamed `clang/AST/TypeNodes.{def => inc}` and replaced the `createDriverOptTable` factory with a singleton returned by `getDriverOptTable`.
Diffstat (limited to 'src')
-rw-r--r--src/Output.cxx12
-rw-r--r--src/RunClang.cxx4
2 files changed, 14 insertions, 2 deletions
diff --git a/src/Output.cxx b/src/Output.cxx
index 78f9eb3..b096d80 100644
--- a/src/Output.cxx
+++ b/src/Output.cxx
@@ -189,7 +189,11 @@ protected:
{ \
this->OutputUnimplementedType(t, dn); \
}
-#include "clang/AST/TypeNodes.def"
+#if LLVM_VERSION_MAJOR >= 10
+# include "clang/AST/TypeNodes.inc"
+#else
+# include "clang/AST/TypeNodes.def"
+#endif
void OutputUnimplementedType(clang::Type const* t, DumpNode const* dn)
{
@@ -1115,7 +1119,11 @@ void ASTVisitor::OutputType(DumpType dt, DumpNode const* dn)
this->Output##CLASS##Type( \
static_cast<clang::CLASS##Type const*>(t.getTypePtr()), dn); \
break;
-#include "clang/AST/TypeNodes.def"
+#if LLVM_VERSION_MAJOR >= 10
+# include "clang/AST/TypeNodes.inc"
+#else
+# include "clang/AST/TypeNodes.def"
+#endif
}
}
}
diff --git a/src/RunClang.cxx b/src/RunClang.cxx
index 0311a2a..f1a6172 100644
--- a/src/RunClang.cxx
+++ b/src/RunClang.cxx
@@ -540,8 +540,12 @@ runClangCreateDiagnostics(const char* const* argBeg, const char* const* argEnd)
new clang::DiagnosticOptions);
llvm::IntrusiveRefCntPtr<clang::DiagnosticIDs> diagID(
new clang::DiagnosticIDs());
+#if LLVM_VERSION_MAJOR >= 10
+ llvm::opt::OptTable const* opts = &clang::driver::getDriverOptTable();
+#else
std::unique_ptr<llvm::opt::OptTable> opts(
clang::driver::createDriverOptTable());
+#endif
unsigned missingArgIndex, missingArgCount;
#if LLVM_VERSION_MAJOR > 3 || \
LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR >= 7