[clang] [clang][Interp] Implement __builtin_addressof (PR #77303)

2024-01-11 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/77303 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Implement __builtin_addressof (PR #77303)

2024-01-10 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/77303 >From aa7ebd9f13d8b7a58f87dc8b00b99acca7f69196 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Mon, 11 Dec 2023 15:12:37 +0100 Subject:

[clang] [clang][Interp] Implement __builtin_addressof (PR #77303)

2024-01-09 Thread via cfe-commits
@@ -613,15 +615,34 @@ static bool interp__builtin_ffs(InterpState , CodePtr OpPC, return true; } +static bool interp__builtin_addressof(InterpState , CodePtr OpPC, + const InterpFrame *Frame, + const

[clang] [clang][Interp] Implement __builtin_addressof (PR #77303)

2024-01-09 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/77303 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Implement __builtin_addressof (PR #77303)

2024-01-09 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. LGTM modulo comment https://github.com/llvm/llvm-project/pull/77303 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Implement __builtin_addressof (PR #77303)

2024-01-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes We don't need to do anything here, since the input is already a Pointer. The only complexity is that we pre-classify the parameters as PT_Ptr, but they might end up being of a different pointer type, e.g.

[clang] [clang][Interp] Implement __builtin_addressof (PR #77303)

2024-01-08 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/77303 We don't need to do anything here, since the input is already a Pointer. The only complexity is that we pre-classify the parameters as PT_Ptr, but they might end up being of a different pointer type, e.g.