[clang] [lldb] [clang][DebugInfo][gmodules] Set runtimeLang on ObjC forward declarations (PR #120154)

2024-12-17 Thread Adrian Prantl via cfe-commits
https://github.com/adrian-prantl approved this pull request. https://github.com/llvm/llvm-project/pull/120154 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [clang][DebugInfo][gmodules] Set runtimeLang on ObjC forward declarations (PR #120154)

2024-12-16 Thread Adrian Prantl via cfe-commits
@@ -2995,20 +2995,21 @@ llvm::DIType *CGDebugInfo::CreateType(const ObjCInterfaceType *Ty, if (!ID) return nullptr; + auto RuntimeLang = + static_cast(TheCU->getSourceLanguage()); + // Return a forward declaration if this type was imported from a clang module,

[clang] [llvm] [DebugInfo] Place local ODR-uniqued types in decl DISubprograms (PR #119001)

2024-12-06 Thread Adrian Prantl via cfe-commits
@@ -718,6 +738,29 @@ class MetadataLoader::MetadataLoaderImpl { upgradeCULocals(); } + void cloneLocalTypes() { +for (unsigned I = 0; I < MetadataList.size(); ++I) { adrian-prantl wrote: range-based for? https://github.com/llvm/llvm-project/pull

[clang] [llvm] [DebugInfo] Place local ODR-uniqued types in decl DISubprograms (PR #119001)

2024-12-06 Thread Adrian Prantl via cfe-commits
@@ -546,55 +546,75 @@ class MetadataLoader::MetadataLoaderImpl { /// Move local imports from DICompileUnit's 'imports' field to /// DISubprogram's retainedNodes. + /// Move fucntion-local enums from DICompileUnit's enums adrian-prantl wrote: ```suggestio

[clang] [llvm] [DebugInfo] Place local ODR-uniqued types in decl DISubprograms (PR #119001)

2024-12-06 Thread Adrian Prantl via cfe-commits
@@ -486,6 +486,8 @@ class CGDebugInfo { void EmitFunctionDecl(GlobalDecl GD, SourceLocation Loc, QualType FnType, llvm::Function *Fn = nullptr); + llvm::DIScope *PickCompositeTypeScope(llvm::DIScope *S, StringRef Identifier); adrian

[clang] [clang][DebugInfo] Revert to printing canonical typenames for template aliases (PR #110767)

2024-10-02 Thread Adrian Prantl via cfe-commits
https://github.com/adrian-prantl approved this pull request. Sounds unfortunate, but if you think that's the best choice for unblocking libc++, let's do that. https://github.com/llvm/llvm-project/pull/110767 ___ cfe-commits mailing list cfe-commits@li

[clang] [clang][DebugInfo] Don't mark structured bindings as artificial (PR #100355)

2024-08-06 Thread Adrian Prantl via cfe-commits
https://github.com/adrian-prantl approved this pull request. So this patch makes structured bindings not artificial, so they aren't hidden in debuggers by default. That sounds right to me. https://github.com/llvm/llvm-project/pull/100355 ___ cfe-commi

[clang] [DebugInfo] Change handling of structured bindings of bitfields (PR #94632)

2024-06-14 Thread Adrian Prantl via cfe-commits
https://github.com/adrian-prantl approved this pull request. https://github.com/llvm/llvm-project/pull/94632 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Bump the DWARF version number to 5 on Darwin. (PR #95164)

2024-06-13 Thread Adrian Prantl via cfe-commits
adrian-prantl wrote: Relanded in 8f57f6895724f858c9db924200524fad86cc4f11 https://github.com/llvm/llvm-project/pull/95164 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 8f57f68 - Bump the DWARF version number to 5 on Darwin. (#95164)

2024-06-13 Thread Adrian Prantl via cfe-commits
Author: Adrian Prantl Date: 2024-06-13T09:52:11-07:00 New Revision: 8f57f6895724f858c9db924200524fad86cc4f11 URL: https://github.com/llvm/llvm-project/commit/8f57f6895724f858c9db924200524fad86cc4f11 DIFF: https://github.com/llvm/llvm-project/commit/8f57f6895724f858c9db924200524fad86cc4f11.diff

[clang] 0f53a59 - Fix typos in comment

2024-06-13 Thread Adrian Prantl via cfe-commits
Author: Adrian Prantl Date: 2024-06-13T09:52:39-07:00 New Revision: 0f53a59fa6b4a7828cf6dbabb0056a379cdc4d0a URL: https://github.com/llvm/llvm-project/commit/0f53a59fa6b4a7828cf6dbabb0056a379cdc4d0a DIFF: https://github.com/llvm/llvm-project/commit/0f53a59fa6b4a7828cf6dbabb0056a379cdc4d0a.diff

[clang] Bump the DWARF version number to 5 on Darwin. (PR #95164)

2024-06-12 Thread Adrian Prantl via cfe-commits
adrian-prantl wrote: Thanks! https://github.com/llvm/llvm-project/pull/95164 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Bump the DWARF version number to 5 on Darwin. (PR #95164)

2024-06-12 Thread Adrian Prantl via cfe-commits
https://github.com/adrian-prantl closed https://github.com/llvm/llvm-project/pull/95164 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Bump the DWARF version number to 5 on Darwin. (PR #95164)

2024-06-12 Thread Adrian Prantl via cfe-commits
https://github.com/adrian-prantl updated https://github.com/llvm/llvm-project/pull/95164 >From 67dd473d7d1e23177caad0cd722eeb341cf63ebc Mon Sep 17 00:00:00 2001 From: Adrian Prantl Date: Tue, 11 Jun 2024 11:04:00 -0700 Subject: [PATCH] Bump the DWARF version number to 5 on Darwin. The default

[clang] Bump the DWARF version number to 5 on Darwin. (PR #95164)

2024-06-11 Thread Adrian Prantl via cfe-commits
https://github.com/adrian-prantl updated https://github.com/llvm/llvm-project/pull/95164 >From 112f03d9d014cda3c89afd4845c0c78289058d11 Mon Sep 17 00:00:00 2001 From: Adrian Prantl Date: Tue, 11 Jun 2024 11:04:00 -0700 Subject: [PATCH] Bump the DWARF version number to 5 on Darwin. The default

[clang] Bump the DWARF version number to 5 on Darwin. (PR #95164)

2024-06-11 Thread Adrian Prantl via cfe-commits
https://github.com/adrian-prantl edited https://github.com/llvm/llvm-project/pull/95164 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Bump the DWARF version number to 5 on Darwin. (PR #95164)

2024-06-11 Thread Adrian Prantl via cfe-commits
https://github.com/adrian-prantl created https://github.com/llvm/llvm-project/pull/95164 rdar://110925733 >From bdc0c661ca59ce1cddbc1615a3e640d2943c9c28 Mon Sep 17 00:00:00 2001 From: Adrian Prantl Date: Tue, 11 Jun 2024 11:04:00 -0700 Subject: [PATCH] Bump the DWARF version number to 5 on Dar

[clang] Fix #pragma (packed, n) not emitting the alignment in debug info (PR #94673)

2024-06-06 Thread Adrian Prantl via cfe-commits
https://github.com/adrian-prantl approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/94673 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Enable LLDB tests in Linux pre-merge CI (PR #94208)

2024-06-04 Thread Adrian Prantl via cfe-commits
adrian-prantl wrote: > A revert is not appropriate when: > lldb tests fail because AST printing has changed in Clang and the printed > output is valid Following the logic in this argument, would you also say it's appropriate for someone to commit an LLVM patch that changes how textual LLVM IR

[clang] [llvm] Enable LLDB tests in Linux pre-merge CI (PR #94208)

2024-06-04 Thread Adrian Prantl via cfe-commits
adrian-prantl wrote: > But also, changes in Clang that break lldb do not necessarily mean that a PR > is not ready to land. There are conforming changes that can be made to Clang > which lldb needs to react to as a downstream consumer of Clang as a library > rather than a PR author needing to

[clang] [llvm] [DebugInfo] Use DW_op_bit_piece for structured bindings of bitfields (PR #85665)

2024-05-15 Thread Adrian Prantl via cfe-commits
@@ -6178,10 +6178,16 @@ The current supported opcode vocabulary is limited: the last entry from the second last entry and appends the result to the expression stack. - ``DW_OP_plus_uconst, 93`` adds ``93`` to the working expression. -- ``DW_OP_LLVM_fragment, 16, 8`` specifi

[clang] [llvm] [DebugInfo] Use DW_op_bit_piece for structured bindings of bitfields (PR #85665)

2024-05-14 Thread Adrian Prantl via cfe-commits
https://github.com/adrian-prantl edited https://github.com/llvm/llvm-project/pull/85665 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [DebugInfo] Use DW_op_bit_piece for structured bindings of bitfields (PR #85665)

2024-05-14 Thread Adrian Prantl via cfe-commits
@@ -6178,10 +6178,16 @@ The current supported opcode vocabulary is limited: the last entry from the second last entry and appends the result to the expression stack. - ``DW_OP_plus_uconst, 93`` adds ``93`` to the working expression. -- ``DW_OP_LLVM_fragment, 16, 8`` specifi

[clang] [llvm] [DebugInfo] Use DW_op_bit_piece for structured bindings of bitfields (PR #85665)

2024-05-09 Thread Adrian Prantl via cfe-commits
@@ -6178,10 +6178,16 @@ The current supported opcode vocabulary is limited: the last entry from the second last entry and appends the result to the expression stack. - ``DW_OP_plus_uconst, 93`` adds ``93`` to the working expression. -- ``DW_OP_LLVM_fragment, 16, 8`` specifi

[clang] [clang-tools-extra] Reapply "[Clang] Unify interface for accessing template arguments as written for class/variable template specializations (#81642)" (PR #91393)

2024-05-08 Thread Adrian Prantl via cfe-commits
adrian-prantl wrote: Interesting. I though that the check-lldb target would clean the module cache before each run? https://github.com/llvm/llvm-project/blob/fcfc15b7052a311b7a045e2c6bd26fb5d0b7122c/lldb/test/CMakeLists.txt#L56 https://github.com/llvm/llvm-project/blob/fcfc15b7052a311b7a045e2c6

[clang] [llvm] [DebugInfo] Use DW_op_bit_piece for structured bindings of bitfields (PR #85665)

2024-05-08 Thread Adrian Prantl via cfe-commits
@@ -6178,10 +6178,16 @@ The current supported opcode vocabulary is limited: the last entry from the second last entry and appends the result to the expression stack. - ``DW_OP_plus_uconst, 93`` adds ``93`` to the working expression. -- ``DW_OP_LLVM_fragment, 16, 8`` specifi

[clang] [llvm] [DebugInfo] Use DW_op_bit_piece for structured bindings of bitfields (PR #85665)

2024-05-08 Thread Adrian Prantl via cfe-commits
@@ -6178,10 +6178,16 @@ The current supported opcode vocabulary is limited: the last entry from the second last entry and appends the result to the expression stack. - ``DW_OP_plus_uconst, 93`` adds ``93`` to the working expression. -- ``DW_OP_LLVM_fragment, 16, 8`` specifi

[clang] [clang-tools-extra] Reapply "[Clang] Unify interface for accessing template arguments as written for class/variable template specializations (#81642)" (PR #91393)

2024-05-07 Thread Adrian Prantl via cfe-commits
adrian-prantl wrote: How did you address the LLDB test failures? https://github.com/llvm/llvm-project/pull/91393 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 2e4abfa - Revert "[Sema] Fix warnings"

2024-05-07 Thread Adrian Prantl via cfe-commits
Author: Adrian Prantl Date: 2024-05-07T13:03:14-07:00 New Revision: 2e4abfae57f81e2bb23fc654d6edbaeae51ae10a URL: https://github.com/llvm/llvm-project/commit/2e4abfae57f81e2bb23fc654d6edbaeae51ae10a DIFF: https://github.com/llvm/llvm-project/commit/2e4abfae57f81e2bb23fc654d6edbaeae51ae10a.diff

[clang] [clang-tools-extra] [Clang] Unify interface for accessing template arguments as written for class/variable template specializations (PR #81642)

2024-05-07 Thread Adrian Prantl via cfe-commits
adrian-prantl wrote: This broke several tests in the LLDB testsuite, I'm going to have to revert this. https://green.lab.llvm.org/job/llvm.org/view/LLDB/job/as-lldb-cmake/3480/ https://github.com/llvm/llvm-project/pull/81642 ___ cfe-commits mailing li

[clang] [clang][PGO] Apply artificial DebugLoc to llvm.instrprof.increment instructions (PR #90717)

2024-05-02 Thread Adrian Prantl via cfe-commits
https://github.com/adrian-prantl approved this pull request. https://github.com/llvm/llvm-project/pull/90717 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add support for builtin_verbose_trap (PR #79230)

2024-05-02 Thread Adrian Prantl via cfe-commits
@@ -172,6 +172,27 @@ static bool checkArgCount(Sema &S, CallExpr *Call, unsigned DesiredArgCount) { << /*is non object*/ 0 << Call->getArg(1)->getSourceRange(); } +static bool checkBuiltinVerboseTrap(CallExpr *Call, Sema &S) { + bool HasError = false; + + for (int

[clang] Add support for builtin_verbose_trap (PR #79230)

2024-05-02 Thread Adrian Prantl via cfe-commits
https://github.com/adrian-prantl approved this pull request. https://github.com/llvm/llvm-project/pull/79230 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add support for builtin_verbose_trap (PR #79230)

2024-05-02 Thread Adrian Prantl via cfe-commits
@@ -29,7 +29,9 @@ #include "llvm/IR/DebugInfo.h" #include "llvm/IR/ValueHandle.h" #include "llvm/Support/Allocator.h" +#include adrian-prantl wrote: This seems to not belong to this commit? https://github.com/llvm/llvm-project/pull/79230

[clang] Add support for builtin_verbose_trap (PR #79230)

2024-05-02 Thread Adrian Prantl via cfe-commits
https://github.com/adrian-prantl edited https://github.com/llvm/llvm-project/pull/79230 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add support for builtin_verbose_trap (PR #79230)

2024-04-29 Thread Adrian Prantl via cfe-commits
@@ -27,6 +27,9 @@ namespace llvm { } } +// Prefix for __builtin_verbose_trap. +#define CLANG_VERBOSE_TRAP_PREFIX "__llvm_verbose_trap" adrian-prantl wrote: Does this have to be a macro or could it be a C++ constant? https://github.com/llvm/llvm-project/pul

[clang] [DebugInfo] Add flag to only emit referenced member functions (PR #87018)

2024-04-01 Thread Adrian Prantl via cfe-commits
adrian-prantl wrote: Seems to be a reasonable tuning option to have available. I probably wouldn't want this to be on by default, but I can see the appeal. https://github.com/llvm/llvm-project/pull/87018 ___ cfe-commits mailing list cfe-commits@lists.

[clang] 380f0fb - [CodeGen/DWARF] Introduce DWARF tag for SwiftTail and emit it in CodeGen.

2024-03-28 Thread Adrian Prantl via cfe-commits
Author: Adrian Prantl Date: 2024-03-28T14:54:51-07:00 New Revision: 380f0fb682041aca3d682d9f1be9d3021f4b2daa URL: https://github.com/llvm/llvm-project/commit/380f0fb682041aca3d682d9f1be9d3021f4b2daa DIFF: https://github.com/llvm/llvm-project/commit/380f0fb682041aca3d682d9f1be9d3021f4b2daa.diff

[clang] [clang-tools-extra] [compiler-rt] [flang] [lld] [lldb] [llvm] [mlir] [openmp] [pstl] Finally formalise our defacto line-ending policy (PR #86318)

2024-03-22 Thread Adrian Prantl via cfe-commits
adrian-prantl wrote: While I'm sure this commit will manage to break _something_ unexpectedly, I think this is reasonable to do! Thanks for taking this on. https://github.com/llvm/llvm-project/pull/86318 ___ cfe-commits mailing list cfe-commits@lists.

[clang] [llvm] [DebugInfo] Use DW_op_bit_piece for structured bindings of bitfields (PR #85665)

2024-03-19 Thread Adrian Prantl via cfe-commits
@@ -8,8 +8,8 @@ struct S0 { // CHECK-LABEL: define dso_local void @_Z3fS0v // CHECK:alloca %struct.S0, align 4 // CHECK-NEXT:[[TMP0:%.*]] = alloca %struct.S0, align 4 -// CHECK: call void @llvm.dbg.declare(metadata ptr [[TMP0]], metadata [[S

[clang] [llvm] [DebugInfo] Use DW_op_bit_piece for structured bindings of bitfields (PR #85665)

2024-03-19 Thread Adrian Prantl via cfe-commits
@@ -8,8 +8,8 @@ struct S0 { // CHECK-LABEL: define dso_local void @_Z3fS0v // CHECK:alloca %struct.S0, align 4 // CHECK-NEXT:[[TMP0:%.*]] = alloca %struct.S0, align 4 -// CHECK: call void @llvm.dbg.declare(metadata ptr [[TMP0]], metadata [[S

[clang] [llvm] [DebugInfo] Use DW_op_bit_piece for structured bindings of bitfields (PR #85665)

2024-03-19 Thread Adrian Prantl via cfe-commits
@@ -8,8 +8,8 @@ struct S0 { // CHECK-LABEL: define dso_local void @_Z3fS0v // CHECK:alloca %struct.S0, align 4 // CHECK-NEXT:[[TMP0:%.*]] = alloca %struct.S0, align 4 -// CHECK: call void @llvm.dbg.declare(metadata ptr [[TMP0]], metadata [[S

[clang] [llvm] [DebugInfo] Use DW_op_bit_piece for structured bindings of bitfields (PR #85665)

2024-03-19 Thread Adrian Prantl via cfe-commits
@@ -8,8 +8,8 @@ struct S0 { // CHECK-LABEL: define dso_local void @_Z3fS0v // CHECK:alloca %struct.S0, align 4 // CHECK-NEXT:[[TMP0:%.*]] = alloca %struct.S0, align 4 -// CHECK: call void @llvm.dbg.declare(metadata ptr [[TMP0]], metadata [[S

[clang] [llvm] [DebugInfo] Use DW_op_bit_piece for structured bindings of bitfields (PR #85665)

2024-03-19 Thread Adrian Prantl via cfe-commits
@@ -8,8 +8,8 @@ struct S0 { // CHECK-LABEL: define dso_local void @_Z3fS0v // CHECK:alloca %struct.S0, align 4 // CHECK-NEXT:[[TMP0:%.*]] = alloca %struct.S0, align 4 -// CHECK: call void @llvm.dbg.declare(metadata ptr [[TMP0]], metadata [[S

[clang] [llvm] [DebugInfo] Use DW_op_bit_piece for structured bindings of bitfields (PR #85665)

2024-03-18 Thread Adrian Prantl via cfe-commits
@@ -8,8 +8,8 @@ struct S0 { // CHECK-LABEL: define dso_local void @_Z3fS0v // CHECK:alloca %struct.S0, align 4 // CHECK-NEXT:[[TMP0:%.*]] = alloca %struct.S0, align 4 -// CHECK: call void @llvm.dbg.declare(metadata ptr [[TMP0]], metadata [[S

[clang] [llvm] [DebugInfo] Use DW_op_bit_piece for structured bindings of bitfields (PR #85665)

2024-03-18 Thread Adrian Prantl via cfe-commits
https://github.com/adrian-prantl edited https://github.com/llvm/llvm-project/pull/85665 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [DebugInfo] Use DW_op_bit_piece for structured bindings of bitfields (PR #85665)

2024-03-18 Thread Adrian Prantl via cfe-commits
https://github.com/adrian-prantl requested changes to this pull request. https://github.com/llvm/llvm-project/pull/85665 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Move CCC_OVERRIDE_OPTIONS implementation to Driver (PR #85425)

2024-03-15 Thread Adrian Prantl via cfe-commits
https://github.com/adrian-prantl approved this pull request. https://github.com/llvm/llvm-project/pull/85425 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeCompletion] Allow debuggers to code-complete reserved identifiers (PR #84891)

2024-03-12 Thread Adrian Prantl via cfe-commits
https://github.com/adrian-prantl approved this pull request. https://github.com/llvm/llvm-project/pull/84891 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][DebugInfo] Use CGDebugInfo::createFile in CGDebugInfo::CreateCompileUnit (#83174) (PR #83175)

2024-03-01 Thread Adrian Prantl via cfe-commits
@@ -0,0 +1,20 @@ +// RUN: mkdir -p %t/src +// RUN: cp %s %t/src/debug-info-debug-prefix-map.c + +// RUN: mkdir -p %t/out +// RUN: cd %t/out +// RUN: %clang_cc1 -debug-info-kind=limited -triple %itanium_abi_triple \ +// RUN: -fdebug-prefix-map="%t/=./" %t/src/debug-info-debug-pre

[clang] [Clang][DebugInfo] Use CGDebugInfo::createFile in CGDebugInfo::CreateCompileUnit (#83174) (PR #83175)

2024-02-27 Thread Adrian Prantl via cfe-commits
@@ -628,9 +628,8 @@ void CGDebugInfo::CreateCompileUnit() { // file was specified with an absolute path. if (CSKind) CSInfo.emplace(*CSKind, Checksum); - llvm::DIFile *CUFile = DBuilder.createFile( - remapDIPath(MainFileName), remapDIPath(getCurrentDirname()), CSI

[clang] [Clang][DebugInfo] Use CGDebugInfo::createFile in CGDebugInfo::CreateCompileUnit (#83174) (PR #83175)

2024-02-27 Thread Adrian Prantl via cfe-commits
https://github.com/adrian-prantl commented: Can you add a test for this? https://github.com/llvm/llvm-project/pull/83175 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 66d462d - Add missing textual header to module map

2024-02-08 Thread Adrian Prantl via cfe-commits
Author: Adrian Prantl Date: 2024-02-08T08:56:25-08:00 New Revision: 66d462d0a1ba1e510fff479baff8f21ecb924b1f URL: https://github.com/llvm/llvm-project/commit/66d462d0a1ba1e510fff479baff8f21ecb924b1f DIFF: https://github.com/llvm/llvm-project/commit/66d462d0a1ba1e510fff479baff8f21ecb924b1f.diff

[clang] Add support for builtin_verbose_trap (PR #79230)

2024-02-01 Thread Adrian Prantl via cfe-commits
@@ -3416,6 +3437,27 @@ llvm::DIMacroFile *CGDebugInfo::CreateTempMacroFile(llvm::DIMacroFile *Parent, return DBuilder.createTempMacroFile(Parent, Line, FName); } +llvm::DILocation *CGDebugInfo::CreateTrapFailureMessageFor( +llvm::DebugLoc TrapLocation, StringRef Prefix,

[clang] Add support for builtin_verbose_trap (PR #79230)

2024-02-01 Thread Adrian Prantl via cfe-commits
@@ -3416,6 +3437,27 @@ llvm::DIMacroFile *CGDebugInfo::CreateTempMacroFile(llvm::DIMacroFile *Parent, return DBuilder.createTempMacroFile(Parent, Line, FName); } +llvm::DILocation *CGDebugInfo::CreateTrapFailureMessageFor( +llvm::DebugLoc TrapLocation, StringRef Prefix,

[clang] Add support for builtin_verbose_trap (PR #79230)

2024-02-01 Thread Adrian Prantl via cfe-commits
@@ -346,6 +348,15 @@ class CGDebugInfo { const FieldDecl *BitFieldDecl, const llvm::DIDerivedType *BitFieldDI, llvm::ArrayRef PreviousFieldsDI, const RecordDecl *RD); + // A cache that maps artificial inlined function names used for + // __builtin_verbose_trap to

[clang] Add support for builtin_verbose_trap (PR #79230)

2024-02-01 Thread Adrian Prantl via cfe-commits
@@ -346,6 +348,15 @@ class CGDebugInfo { const FieldDecl *BitFieldDecl, const llvm::DIDerivedType *BitFieldDI, llvm::ArrayRef PreviousFieldsDI, const RecordDecl *RD); + // A cache that maps artificial inlined function names used for + // __builtin_verbose_trap to

[clang] Add support for builtin_verbose_trap (PR #79230)

2024-02-01 Thread Adrian Prantl via cfe-commits
@@ -602,6 +613,19 @@ class CGDebugInfo { return CoroutineParameterMappings; } + // Create a debug location from `TrapLocation` that adds an artificial inline + // frame where the frame name is + // + // * `: ` if `` is not empty. + // * `` if `` is empty. Note `` mu

[clang] Add support for builtin_verbose_trap (PR #79230)

2024-02-01 Thread Adrian Prantl via cfe-commits
@@ -3424,6 +3443,26 @@ llvm::DIMacroFile *CGDebugInfo::CreateTempMacroFile(llvm::DIMacroFile *Parent, return DBuilder.createTempMacroFile(Parent, Line, FName); } +llvm::DILocation * +CGDebugInfo::CreateTrapFailureMessageFor(llvm::DebugLoc TrapLocation, +

[clang] Add support for builtin_verbose_trap (PR #79230)

2024-01-24 Thread Adrian Prantl via cfe-commits
adrian-prantl wrote: > neat idea (I imagine some debuggers will trip over the space in the inlined > name, but seems pretty good) For spaces specifically there's a multi-decade precedent: Objective-C methods have names like `DW_AT_name ("-[NSObject init:]")` https://github.com/llvm/llvm-pro

[clang] Add support for builtin_verbose_trap (PR #79230)

2024-01-24 Thread Adrian Prantl via cfe-commits
adrian-prantl wrote: For context, we've been using this same trick in the Swift standard library for a long time now, to get a good trade-off between space-efficient code generation and usability for inlineable functions such as the arithmetic `+` operator, which traps on overflow. https://g

[clang] Add support for builtin_verbose_trap (PR #79230)

2024-01-24 Thread Adrian Prantl via cfe-commits
@@ -3416,6 +3437,27 @@ llvm::DIMacroFile *CGDebugInfo::CreateTempMacroFile(llvm::DIMacroFile *Parent, return DBuilder.createTempMacroFile(Parent, Line, FName); } +llvm::DILocation *CGDebugInfo::CreateTrapFailureMessageFor( +llvm::DebugLoc TrapLocation, StringRef Prefix,

[clang] Add support for builtin_verbose_trap (PR #79230)

2024-01-24 Thread Adrian Prantl via cfe-commits
@@ -1628,6 +1628,27 @@ llvm::DIType *CGDebugInfo::createFieldType( offsetInBits, flags, debugType, Annotations); } +llvm::DISubprogram * +CGDebugInfo::getFakeFuncSubprogram(const std::string &FakeFuncName) { adrian-prantl wr

[clang] Add support for builtin_verbose_trap (PR #79230)

2024-01-24 Thread Adrian Prantl via cfe-commits
https://github.com/adrian-prantl commented: A cosmetic suggestion I have would be to replace all instances of `Fake` with `inlinedTrap` to make the purpose clearer. https://github.com/llvm/llvm-project/pull/79230 ___ cfe-commits mailing list cfe-commi

[clang] Add support for builtin_verbose_trap (PR #79230)

2024-01-24 Thread Adrian Prantl via cfe-commits
https://github.com/adrian-prantl edited https://github.com/llvm/llvm-project/pull/79230 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang-tools-extra] [lldb] [lldb][test] Add tests for target.max-string-summary-length setting (PR #77920)

2024-01-12 Thread Adrian Prantl via cfe-commits
https://github.com/adrian-prantl approved this pull request. https://github.com/llvm/llvm-project/pull/77920 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ASTImporter] Only reorder fields of RecordDecls (PR #77079)

2024-01-05 Thread Adrian Prantl via cfe-commits
https://github.com/adrian-prantl approved this pull request. Test would be nice, but generally this looks like a reasonable modification. https://github.com/llvm/llvm-project/pull/77079 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://li

[clang] [llvm] [CloneFunction][DebugInfo] Avoid cloning DILocalVariables of inlined functions (PR #75385)

2023-12-15 Thread Adrian Prantl via cfe-commits
https://github.com/adrian-prantl commented: I think this LGTM, but it would be good if someone else also took a look. https://github.com/llvm/llvm-project/pull/75385 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin

[clang] [llvm] [CloneFunction][DebugInfo] Avoid cloning DILocalVariables of inlined functions (PR #75385)

2023-12-15 Thread Adrian Prantl via cfe-commits
@@ -238,6 +238,13 @@ void llvm::CloneFunctionInto(Function *NewFunc, const Function *OldFunc, } } +// Avoid cloning local variables of subprograms that won't be cloned. adrian-prantl wrote: Can you add a sentence explaining why some subprograms

[clang] [clang-tools-extra] [lldb] [llvm] [lldb][test] Apply @expectedFailureAll/@skipIf early for debug_info tests (PR #73067)

2023-12-05 Thread Adrian Prantl via cfe-commits
adrian-prantl wrote: SGTM, maybe wait one more day for @JDevlieghere to chime in. https://github.com/llvm/llvm-project/pull/73067 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang-tools-extra] [lldb] [clang] [lldb][test] Apply @expectedFailureAll/@skipIf early for debug_info tests (PR #73067)

2023-12-05 Thread Adrian Prantl via cfe-commits
adrian-prantl wrote: Is this a performance optimization or a function al change? https://github.com/llvm/llvm-project/pull/73067 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][modules] Reset codegen options. (PR #74006)

2023-12-01 Thread Adrian Prantl via cfe-commits
https://github.com/adrian-prantl approved this pull request. https://github.com/llvm/llvm-project/pull/74006 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [BoundsSafety] Initial documentation for -fbounds-safety (PR #70749)

2023-11-30 Thread Adrian Prantl via cfe-commits
@@ -0,0 +1,255 @@ + +Implementation plans for ``-fbounds-safety`` + + +.. contents:: + :local: + +External bounds annotations +=== + +The bounds annotations are C type

[clang] [BoundsSafety] Initial documentation for -fbounds-safety (PR #70749)

2023-11-30 Thread Adrian Prantl via cfe-commits
https://github.com/adrian-prantl approved this pull request. Debug info part looks good! https://github.com/llvm/llvm-project/pull/70749 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [BoundsSafety] Initial documentation for -fbounds-safety (PR #70749)

2023-11-30 Thread Adrian Prantl via cfe-commits
https://github.com/adrian-prantl edited https://github.com/llvm/llvm-project/pull/70749 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][DebugInfo] Improve heuristic to determine whether to evaluate a static variable's initializer (PR #72974)

2023-11-29 Thread Adrian Prantl via cfe-commits
https://github.com/adrian-prantl approved this pull request. https://github.com/llvm/llvm-project/pull/72974 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Remove unused argument. NFC. (PR #73594)

2023-11-28 Thread Adrian Prantl via cfe-commits
https://github.com/adrian-prantl approved this pull request. I can't even remember what this was supposed to do. https://github.com/llvm/llvm-project/pull/73594 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mail

[lldb] [flang] [clang] [clang-tools-extra] [llvm] [mlir] [compiler-rt] [CodeGen][DebugInfo] Add missing debug info for jump table BB (PR #71021)

2023-11-15 Thread Adrian Prantl via cfe-commits
https://github.com/adrian-prantl approved this pull request. https://github.com/llvm/llvm-project/pull/71021 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [llvm][DebugInfo] DWARFv5: static data members declarations are DW_TAG_variable (PR #72234)

2023-11-14 Thread Adrian Prantl via cfe-commits
https://github.com/adrian-prantl approved this pull request. LGTM, then https://github.com/llvm/llvm-project/pull/72234 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [llvm][DebugInfo] DWARFv5: static data members declarations are DW_TAG_variable (PR #72234)

2023-11-14 Thread Adrian Prantl via cfe-commits
@@ -1681,7 +1681,8 @@ CGDebugInfo::CreateRecordStaticField(const VarDecl *Var, llvm::DIType *RecordTy, llvm::DINode::DIFlags Flags = getAccessFlag(Var->getAccess(), RD); auto Align = getDeclAlignIfRequired(Var, CGM.getContext()); llvm::DIDerivedType *GV = DBuilder.create

[llvm] [clang] [llvm][DebugInfo] DWARFv5: static data members declarations are DW_TAG_variable (PR #72234)

2023-11-14 Thread Adrian Prantl via cfe-commits
https://github.com/adrian-prantl requested changes to this pull request. I think this is missing a test in clang/test/CodeGenCXX that verifies Clang generates the expected LLVM IR. https://github.com/llvm/llvm-project/pull/72234 ___ cfe-commits mailin

[llvm] [clang] [llvm][DebugInfo] DWARFv5: static data members declarations are DW_TAG_variable (PR #72234)

2023-11-14 Thread Adrian Prantl via cfe-commits
@@ -1315,17 +1315,15 @@ LLVMDIBuilderCreateUnspecifiedType(LLVMDIBuilderRef Builder, const char *Name, return wrap(unwrap(Builder)->createUnspecifiedType({Name, NameLen})); } -LLVMMetadataRef -LLVMDIBuilderCreateStaticMemberType( +LLVMMetadataRef LLVMDIBuilderCreateStaticMe

[clang] [llvm] [llvm][DebugInfo] DWARFv5: static data members declarations are DW_TAG_variable (PR #72234)

2023-11-14 Thread Adrian Prantl via cfe-commits
https://github.com/adrian-prantl edited https://github.com/llvm/llvm-project/pull/72234 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [llvm][DebugInfo] DWARFv5: static data members declarations are DW_TAG_variable (PR #72234)

2023-11-14 Thread Adrian Prantl via cfe-commits
https://github.com/adrian-prantl approved this pull request. https://github.com/llvm/llvm-project/pull/72234 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[lldb] [clang] Reland "[clang][DebugInfo] Emit global variable definitions for static data members with constant initializers" (PR #71780)

2023-11-10 Thread Adrian Prantl via cfe-commits
@@ -5800,6 +5827,18 @@ void CGDebugInfo::setDwoId(uint64_t Signature) { } void CGDebugInfo::finalize() { + for (auto const *VD : StaticDataMemberDefinitionsToEmit) { +assert(VD->isStaticDataMember()); + +if (DeclCache.contains(VD)) + continue; + +if (!VD->has

[clang] [lldb] Reland "[clang][DebugInfo] Emit global variable definitions for static data members with constant initializers" (PR #71780)

2023-11-10 Thread Adrian Prantl via cfe-commits
https://github.com/adrian-prantl approved this pull request. Minor comments inside. https://github.com/llvm/llvm-project/pull/71780 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] Reland "[clang][DebugInfo] Emit global variable definitions for static data members with constant initializers" (PR #71780)

2023-11-10 Thread Adrian Prantl via cfe-commits
@@ -5596,6 +5587,42 @@ void CGDebugInfo::EmitGlobalVariable(const ValueDecl *VD, const APValue &Init) { TemplateParameters, Align)); } +void CGDebugInfo::EmitGlobalVariable(const VarDecl *VD) { + assert(VD->hasInit()); + assert(CGM.getCodeGenOpts().hasReducedDebugInfo

[clang] [lldb] Reland "[clang][DebugInfo] Emit global variable definitions for static data members with constant initializers" (PR #71780)

2023-11-10 Thread Adrian Prantl via cfe-commits
https://github.com/adrian-prantl edited https://github.com/llvm/llvm-project/pull/71780 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 1adb898 - Mark headers as textual and unbreak the modules build

2023-10-31 Thread Adrian Prantl via cfe-commits
Author: Adrian Prantl Date: 2023-10-31T09:10:50-07:00 New Revision: 1adb898e2db980fc402b8eac7ebc762c75d05826 URL: https://github.com/llvm/llvm-project/commit/1adb898e2db980fc402b8eac7ebc762c75d05826 DIFF: https://github.com/llvm/llvm-project/commit/1adb898e2db980fc402b8eac7ebc762c75d05826.diff

[clang] [Clang][DebugInfo] Clang generates an extra spurious unnamed 'dbg.declare' (PR #69681)

2023-10-23 Thread Adrian Prantl via cfe-commits
https://github.com/adrian-prantl approved this pull request. Aside from other open comments the spirit of the change LGTM. https://github.com/llvm/llvm-project/pull/69681 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[clang] [clang-tidy]Add new check bugprone-casting-through-void (PR #69465)

2023-10-18 Thread Adrian Prantl via cfe-commits
https://github.com/adrian-prantl updated https://github.com/llvm/llvm-project/pull/69465 >From 627f68e57b2526fb72285ef4831fc3c02a6ee6d0 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Wed, 18 Oct 2023 08:47:02 +0800 Subject: [PATCH 1/6] [clang-tidy]Add new check bugprone-casting-through-void

[clang] [clang] set DebugCompilationDir in PCHContainer (PR #67744)

2023-09-29 Thread Adrian Prantl via cfe-commits
https://github.com/adrian-prantl approved this pull request. https://github.com/llvm/llvm-project/pull/67744 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revert "[Parse] Split incremental-extensions" (PR #66281)

2023-09-13 Thread Adrian Prantl via cfe-commits
https://github.com/adrian-prantl approved this pull request. https://github.com/llvm/llvm-project/pull/66281 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Propagate the DWARF version from the main compiler invocation to PCHC… (PR #66032)

2023-09-12 Thread Adrian Prantl via cfe-commits
https://github.com/adrian-prantl closed https://github.com/llvm/llvm-project/pull/66032 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Propagate the DWARF version from the main compiler invocation to PCHC… (PR #66032)

2023-09-11 Thread Adrian Prantl via cfe-commits
https://github.com/adrian-prantl review_requested https://github.com/llvm/llvm-project/pull/66032 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Propagate the DWARF version from the main compiler invocation to PCHC… (PR #66032)

2023-09-11 Thread Adrian Prantl via cfe-commits
https://github.com/adrian-prantl review_requested https://github.com/llvm/llvm-project/pull/66032 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Propagate the DWARF version from the main compiler invocation to PCHC… (PR #66032)

2023-09-11 Thread Adrian Prantl via cfe-commits
https://github.com/adrian-prantl review_requested https://github.com/llvm/llvm-project/pull/66032 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Propagate the DWARF version from the main compiler invocation to PCHC… (PR #66032)

2023-09-11 Thread Adrian Prantl via cfe-commits
https://github.com/adrian-prantl review_requested https://github.com/llvm/llvm-project/pull/66032 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Propagate the DWARF version from the main compiler invocation to PCHC… (PR #66032)

2023-09-11 Thread Adrian Prantl via cfe-commits
https://github.com/adrian-prantl created https://github.com/llvm/llvm-project/pull/66032: …ontainerGenerator Currently it remains uninitialized and thus always uses the LLVM default of 4. >From 6bdd0f5468ae1bf04912a9559c685b335fbe94c9 Mon Sep 17 00:00:00 2001 From: Adrian Prantl Date: Mon, 11

[clang] d6e1909 - Mark header as textual

2023-05-30 Thread Adrian Prantl via cfe-commits
Author: Adrian Prantl Date: 2023-05-30T09:21:39-07:00 New Revision: d6e1909526fea196e20566d7d66c1b6ca04fa9e5 URL: https://github.com/llvm/llvm-project/commit/d6e1909526fea196e20566d7d66c1b6ca04fa9e5 DIFF: https://github.com/llvm/llvm-project/commit/d6e1909526fea196e20566d7d66c1b6ca04fa9e5.diff

  1   2   3   4   5   6   >