[clang] [Clang][Xtensa] Add Xtensa target. (PR #118008)

Eli Friedman via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 6 11:38:36 PST 2024


================
@@ -9727,6 +9727,51 @@ static TypedefDecl *CreateHexagonBuiltinVaListDecl(const ASTContext *Context) {
   return Context->buildImplicitTypedef(VaListTagArrayType, "__builtin_va_list");
 }
 
+static TypedefDecl *
+CreateXtensaABIBuiltinVaListDecl(const ASTContext *Context) {
+  // typedef struct __va_list_tag {
+  RecordDecl *VaListTagDecl;
+
+  VaListTagDecl = Context->buildImplicitRecord("__va_list_tag");
+  VaListTagDecl->startDefinition();
+
+  const size_t NumFields = 3;
+  QualType FieldTypes[NumFields];
----------------
efriedma-quic wrote:

```suggestion
  QualType FieldTypes[] = {Context->getPointerType(Context->IntTy), Context->getPointerType(Context->IntTy), Context->IntTy};
```

https://github.com/llvm/llvm-project/pull/118008


More information about the cfe-commits mailing list