aboutsummaryrefslogtreecommitdiff
path: root/src/zig_clang.cpp
diff options
context:
space:
mode:
authorMichael Dusan <michael.dusan@gmail.com>2021-04-11 17:40:19 -0400
committerMichael Dusan <michael.dusan@gmail.com>2021-04-11 17:40:19 -0400
commit93cf9560b13619159efb3ca12eeeb13d6031ad85 (patch)
tree4b5857db65268b6e3a41fc436082da7b100647b6 /src/zig_clang.cpp
parent86b31394c9d73b0f753918cea4f08ce8d7a26119 (diff)
parent82a31aac9b955213f47ff3b2a2c7eb932fdbe294 (diff)
downloadzig-93cf9560b13619159efb3ca12eeeb13d6031ad85.tar.gz
zig-93cf9560b13619159efb3ca12eeeb13d6031ad85.zip
Merge remote-tracking branch 'origin/master' into llvm12
Diffstat (limited to 'src/zig_clang.cpp')
-rw-r--r--src/zig_clang.cpp34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/zig_clang.cpp b/src/zig_clang.cpp
index 902c4ee7a5..32bb9b4487 100644
--- a/src/zig_clang.cpp
+++ b/src/zig_clang.cpp
@@ -2060,6 +2060,11 @@ bool ZigClangType_isRecordType(const ZigClangType *self) {
return casted->isRecordType();
}
+bool ZigClangType_isVectorType(const ZigClangType *self) {
+ auto casted = reinterpret_cast<const clang::Type *>(self);
+ return casted->isVectorType();
+}
+
bool ZigClangType_isIncompleteOrZeroLengthArrayType(const ZigClangQualType *self,
const struct ZigClangASTContext *ctx)
{
@@ -2752,6 +2757,16 @@ struct ZigClangQualType ZigClangBinaryOperator_getType(const struct ZigClangBina
return bitcast(casted->getType());
}
+const struct ZigClangExpr *ZigClangConvertVectorExpr_getSrcExpr(const struct ZigClangConvertVectorExpr *self) {
+ auto casted = reinterpret_cast<const clang::ConvertVectorExpr *>(self);
+ return reinterpret_cast<const struct ZigClangExpr *>(casted->getSrcExpr());
+}
+
+struct ZigClangQualType ZigClangConvertVectorExpr_getTypeSourceInfo_getType(const struct ZigClangConvertVectorExpr *self) {
+ auto casted = reinterpret_cast<const clang::ConvertVectorExpr *>(self);
+ return bitcast(casted->getTypeSourceInfo()->getType());
+}
+
struct ZigClangQualType ZigClangDecayedType_getDecayedType(const struct ZigClangDecayedType *self) {
auto casted = reinterpret_cast<const clang::DecayedType *>(self);
return bitcast(casted->getDecayedType());
@@ -2857,6 +2872,16 @@ struct ZigClangQualType ZigClangValueDecl_getType(const struct ZigClangValueDecl
return bitcast(casted->getType());
}
+struct ZigClangQualType ZigClangVectorType_getElementType(const struct ZigClangVectorType *self) {
+ auto casted = reinterpret_cast<const clang::VectorType *>(self);
+ return bitcast(casted->getElementType());
+}
+
+unsigned ZigClangVectorType_getNumElements(const struct ZigClangVectorType *self) {
+ auto casted = reinterpret_cast<const clang::VectorType *>(self);
+ return casted->getNumElements();
+}
+
const struct ZigClangExpr *ZigClangWhileStmt_getCond(const struct ZigClangWhileStmt *self) {
auto casted = reinterpret_cast<const clang::WhileStmt *>(self);
return reinterpret_cast<const struct ZigClangExpr *>(casted->getCond());
@@ -2936,6 +2961,15 @@ struct ZigClangSourceLocation ZigClangUnaryExprOrTypeTraitExpr_getBeginLoc(
return bitcast(casted->getBeginLoc());
}
+unsigned ZigClangShuffleVectorExpr_getNumSubExprs(const ZigClangShuffleVectorExpr *self) {
+ auto casted = reinterpret_cast<const clang::ShuffleVectorExpr *>(self);
+ return casted->getNumSubExprs();
+}
+
+const struct ZigClangExpr *ZigClangShuffleVectorExpr_getExpr(const struct ZigClangShuffleVectorExpr *self, unsigned idx) {
+ auto casted = reinterpret_cast<const clang::ShuffleVectorExpr *>(self);
+ return reinterpret_cast<const struct ZigClangExpr *>(casted->getExpr(idx));
+}
enum ZigClangUnaryExprOrTypeTrait_Kind ZigClangUnaryExprOrTypeTraitExpr_getKind(
const struct ZigClangUnaryExprOrTypeTraitExpr *self)