#include <clang/AST/ASTContext.h>
#include <clang/AST/RecordLayout.h>
#include <clang/AST/RecursiveASTVisitor.h>
+#include <llvm/ADT/StringExtras.h>
#include "common.h"
#include "table_desc.h"
result_ += "[";
TraverseDecl(F);
if (const ConstantArrayType *T = dyn_cast<ConstantArrayType>(F->getType()))
+#if LLVM_MAJOR_VERSION >= 13
+ result_ += ", [" + toString(T->getSize(), 10, false) + "]";
+#else
result_ += ", [" + T->getSize().toString(10, false) + "]";
+#endif
if (F->isBitField())
result_ += ", " + to_string(F->getBitWidthValue(C));
result_ += "], ";