https://github.com/OCHyams approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/94956
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
OCHyams wrote:
Here's that issue - #91451.
Carlos pointed me to [bz44884](https://bugs.llvm.org/show_bug.cgi?id=44884)
(#44229) which may be related
https://github.com/llvm/llvm-project/pull/90032
___
cfe-commits mailing list
OCHyams wrote:
@Michael137 said:
> Btw, as a follow-up to this patch should we check that this is compatible
> with dsymutil (i.e., running dsymutil --verify)? I suspect it might need a
> fixup (given LLDB doesn't even support this tag)
`dsymutil --verify` seems to be happy with the tag.
OCHyams wrote:
> Comment in the code should probably mention this as a FIXME and include a
> reference to the issue?
Sure, added in f78949a07e33017a798c410a102c95455685a9b1
> Also, there's another bug here - the DW_TAG_typedef is in the CU scope,
> instead of the struct scope. But if the
Author: Orlando Cazalet-Hyams
Date: 2024-04-30T09:16:14+01:00
New Revision: f78949a07e33017a798c410a102c95455685a9b1
URL:
https://github.com/llvm/llvm-project/commit/f78949a07e33017a798c410a102c95455685a9b1
DIFF:
https://github.com/OCHyams closed
https://github.com/llvm/llvm-project/pull/90032
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/OCHyams created
https://github.com/llvm/llvm-project/pull/90032
Workaround for issue #89774 until it can be properly fixed.
When `-gtemplate-alias` is specified Clang emits a DW_TAG_template_alias for
template aliases. This patch avoids an assertion failure by falling back
OCHyams wrote:
Dependent expressions strike again - https://godbolt.org/z/W381837vr
```
template
using A = int;
template
struct S {
using AA = A;
AA aa;
};
S<0> s;
```
` clang++ -c test.cpp -g -gtemplate-alias`
`clang/lib/AST/ExprConstant.cpp:15721: bool
https://github.com/OCHyams closed
https://github.com/llvm/llvm-project/pull/89594
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/OCHyams created
https://github.com/llvm/llvm-project/pull/89594
DW_TAG_template_alias DIEs were added in DWARFv4, not DWARFv5
>From 95c86b499e1eebb15dbd61f839f5fefa83dc910d Mon Sep 17 00:00:00 2001
From: Orlando Cazalet-Hyams
Date: Mon, 22 Apr 2024 11:48:19 +0100
Subject:
https://github.com/OCHyams closed
https://github.com/llvm/llvm-project/pull/87623
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
OCHyams wrote:
Thanks everyone. I'll land this now then to see what the bots have to say about
it.
https://github.com/llvm/llvm-project/pull/87623
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
@@ -0,0 +1,38 @@
+// RUN: %clang_cc1 -triple x86_64-unk-unk -o - -emit-llvm
-debug-info-kind=standalone -gtemplate-alias %s -gsimple-template-names=simple \
+// RUN: | FileCheck %s
+
+ Check that -gtemplate-alias causes DW_TAG_template_alias emission for
+ template
OCHyams wrote:
I've rebased this so now this pull request contains only the Clang changes
(LLVM side is here #88943).
There's a discussion starting
[here](https://github.com/llvm/llvm-project/pull/87623#discussion_r1567968127)
that discusses whether or not we should include defaulted
@@ -1332,6 +1332,54 @@ llvm::DIType *CGDebugInfo::CreateType(const
TemplateSpecializationType *Ty,
auto PP = getPrintingPolicy();
Ty->getTemplateName().print(OS, PP, TemplateName::Qualified::None);
+ SourceLocation Loc = AliasDecl->getLocation();
+
+ if
@@ -1332,6 +1332,54 @@ llvm::DIType *CGDebugInfo::CreateType(const
TemplateSpecializationType *Ty,
auto PP = getPrintingPolicy();
Ty->getTemplateName().print(OS, PP, TemplateName::Qualified::None);
+ SourceLocation Loc = AliasDecl->getLocation();
+
+ if
@@ -1332,6 +1332,54 @@ llvm::DIType *CGDebugInfo::CreateType(const
TemplateSpecializationType *Ty,
auto PP = getPrintingPolicy();
Ty->getTemplateName().print(OS, PP, TemplateName::Qualified::None);
+ SourceLocation Loc = AliasDecl->getLocation();
+
+ if
@@ -1332,6 +1332,54 @@ llvm::DIType *CGDebugInfo::CreateType(const
TemplateSpecializationType *Ty,
auto PP = getPrintingPolicy();
Ty->getTemplateName().print(OS, PP, TemplateName::Qualified::None);
+ SourceLocation Loc = AliasDecl->getLocation();
+
+ if
@@ -1332,6 +1332,54 @@ llvm::DIType *CGDebugInfo::CreateType(const
TemplateSpecializationType *Ty,
auto PP = getPrintingPolicy();
Ty->getTemplateName().print(OS, PP, TemplateName::Qualified::None);
+ SourceLocation Loc = AliasDecl->getLocation();
+
+ if
@@ -1332,6 +1332,54 @@ llvm::DIType *CGDebugInfo::CreateType(const
TemplateSpecializationType *Ty,
auto PP = getPrintingPolicy();
Ty->getTemplateName().print(OS, PP, TemplateName::Qualified::None);
+ SourceLocation Loc = AliasDecl->getLocation();
+
+ if
@@ -1332,6 +1332,54 @@ llvm::DIType *CGDebugInfo::CreateType(const
TemplateSpecializationType *Ty,
auto PP = getPrintingPolicy();
Ty->getTemplateName().print(OS, PP, TemplateName::Qualified::None);
+ SourceLocation Loc = AliasDecl->getLocation();
+
+ if
@@ -0,0 +1,33 @@
+// RUN: %clang_cc1 -triple x86_64-unk-unk -o - -emit-llvm
-debug-info-kind=standalone -gtemplate-alias %s -gsimple-template-names=simple \
+// RUN: | FileCheck %s
+
+ Check that -gtemplate-alias causes DW_TAG_template_alias emission for
+ template
@@ -1332,6 +1332,54 @@ llvm::DIType *CGDebugInfo::CreateType(const
TemplateSpecializationType *Ty,
auto PP = getPrintingPolicy();
Ty->getTemplateName().print(OS, PP, TemplateName::Qualified::None);
+ SourceLocation Loc = AliasDecl->getLocation();
+
+ if
@@ -1332,6 +1332,54 @@ llvm::DIType *CGDebugInfo::CreateType(const
TemplateSpecializationType *Ty,
auto PP = getPrintingPolicy();
Ty->getTemplateName().print(OS, PP, TemplateName::Qualified::None);
+ SourceLocation Loc = AliasDecl->getLocation();
+
+ if
@@ -310,6 +310,24 @@ namespace llvm {
DINode::DIFlags Flags = DINode::FlagZero,
DINodeArray Annotations = nullptr);
+/// Create debugging information entry for a template alias.
+/// \param Ty
https://github.com/OCHyams commented:
(oops, didn't submit my inline replies...)
https://github.com/llvm/llvm-project/pull/87623
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1332,6 +1332,54 @@ llvm::DIType *CGDebugInfo::CreateType(const
TemplateSpecializationType *Ty,
auto PP = getPrintingPolicy();
Ty->getTemplateName().print(OS, PP, TemplateName::Qualified::None);
+ SourceLocation Loc = AliasDecl->getLocation();
+
+ if
https://github.com/OCHyams edited
https://github.com/llvm/llvm-project/pull/87623
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1,4 +1,4 @@
-// RUN: %clang -g -std=c++11 -S -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang -ggdb -std=c++11 -S -emit-llvm %s -o - | FileCheck %s
OCHyams wrote:
Agreed, done
https://github.com/llvm/llvm-project/pull/87623
@@ -465,3 +465,15 @@
// MANGLED_TEMP_NAMES: error: unknown argument
'-gsimple-template-names=mangled'; did you mean '-Xclang
-gsimple-template-names=mangled'
// RUN: %clang -### -target x86_64 -c -g %s 2>&1 | FileCheck
--check-prefix=FULL_TEMP_NAMES
@@ -4584,6 +4584,32 @@ renderDebugOptions(const ToolChain , const Driver ,
const llvm::Triple ,
}
}
+ // Emit DW_TAG_template_alias for template aliases? True by default for SCE.
+ const auto *DebugTemplateAlias = Args.getLastArg(
+ options::OPT_gtemplate_alias,
@@ -5361,7 +5383,56 @@ static bool IsReconstitutableType(QualType QT) {
return T.Reconstitutable;
}
-std::string CGDebugInfo::GetName(const Decl *D, bool Qualified) const {
+bool CGDebugInfo::HasReconstitutableArgs(
+ArrayRef Args) const {
+ return llvm::all_of(Args,
OCHyams wrote:
> But perhaps at least you could add named accessors to DIDerivedType for the
> template params, same as DIGlobalVariable/DICompositeType have?
Done. I couldn't add an assert (`getTag() == dwarf::DW_TAG_template_alias`)
without including `Dwarf.h`. I've chosen to not do that as
OCHyams wrote:
Thanks @dwblaikie
> Bit unfortunate to store template parameters in different ways (in the
> extraData for the alias template, but in the templateParams for the composite
> types) - but I guess it'd be more invasive to try to represent alias
> templates as composite types?
I
OCHyams wrote:
Fixed
https://github.com/llvm/llvm-project/pull/87623
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -152,9 +152,11 @@ uint64_t DebugHandlerBase::getBaseTypeSize(const DIType
*Ty) {
unsigned Tag = DDTy->getTag();
if (Tag != dwarf::DW_TAG_member && Tag != dwarf::DW_TAG_typedef &&
- Tag != dwarf::DW_TAG_const_type && Tag != dwarf::DW_TAG_volatile_type &&
+
@@ -5361,7 +5383,56 @@ static bool IsReconstitutableType(QualType QT) {
return T.Reconstitutable;
}
-std::string CGDebugInfo::GetName(const Decl *D, bool Qualified) const {
+bool CGDebugInfo::HasReconstitutableArgs(
+ArrayRef Args) const {
+ return llvm::all_of(Args,
@@ -310,6 +310,23 @@ namespace llvm {
DINode::DIFlags Flags = DINode::FlagZero,
DINodeArray Annotations = nullptr);
+/// Create debugging information entry for a typedef.
+/// \param Ty
@@ -542,7 +542,8 @@ void InsertPHIStrategy::mutate(BasicBlock ,
RandomIRBuilder ) {
if ( == ()->getEntryBlock())
return;
Type *Ty = IB.randomType();
- PHINode *PHI = PHINode::Create(Ty, llvm::pred_size(), "", ());
+ PHINode *PHI =
+ PHINode::Create(Ty,
https://github.com/OCHyams edited
https://github.com/llvm/llvm-project/pull/85981
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/OCHyams approved this pull request.
LGTM if this is clang-formatted (I can't tell). Plus one small inline nit - I
think it's fine either way.
https://github.com/llvm/llvm-project/pull/85981
___
cfe-commits mailing list
@@ -1542,19 +1542,10 @@ class CallBase : public Instruction {
OperandBundleDef OB,
Instruction *InsertPt = nullptr);
- /// Create a clone of \p CB with operand bundle \p OB added.
- static CallBase
OCHyams wrote:
> LLVM IR parts look good to me.
Thanks!
@pogo59 said:
> Converting frame-types.s from v4 to v5 should be done as a separate commit.
> Then adding the alias would be a simpler change to review.
I've split that into two commits in this PR: upgrade to v5:
Author: Orlando Cazalet-Hyams
Date: 2024-03-18T10:55:29Z
New Revision: 3e6db602918435b6a5ac476f63f8b259e7e73af4
URL:
https://github.com/llvm/llvm-project/commit/3e6db602918435b6a5ac476f63f8b259e7e73af4
DIFF:
Author: Orlando Cazalet-Hyams
Date: 2024-03-18T10:13:35Z
New Revision: 92122b0b4b514ea6c081e428f47ef1bf9d4f0f17
URL:
https://github.com/llvm/llvm-project/commit/92122b0b4b514ea6c081e428f47ef1bf9d4f0f17
DIFF:
Author: Orlando Cazalet-Hyams
Date: 2024-03-18T10:13:12Z
New Revision: 3e4170a587adb789b77ede799d09139b50ebe5bc
URL:
https://github.com/llvm/llvm-project/commit/3e4170a587adb789b77ede799d09139b50ebe5bc
DIFF:
Author: Orlando Cazalet-Hyams
Date: 2024-03-18T10:01:51Z
New Revision: b097b3dc2ba2517621a5e3da3237a77ed0e7586f
URL:
https://github.com/llvm/llvm-project/commit/b097b3dc2ba2517621a5e3da3237a77ed0e7586f
DIFF:
https://github.com/OCHyams closed
https://github.com/llvm/llvm-project/pull/84756
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
OCHyams wrote:
> Maybe wants someone with more frontend knowledge to chime in, but all SGTM.
@adrian-prantl are you able to suggest anyone that might be able to take a look
at this (part of this touches some Objective-C code+test) - we're not overly
familiar with front end code.
https://github.com/OCHyams updated
https://github.com/llvm/llvm-project/pull/84756
>From 8b37020a48b8145ad9d7deb288b9f8a3ee3a9a9b Mon Sep 17 00:00:00 2001
From: Orlando Cazalet-Hyams
Date: Sat, 9 Mar 2024 13:10:05 +
Subject: [PATCH 1/3] clang: insertbefore non-debug for removeDIs stability
https://github.com/OCHyams edited
https://github.com/llvm/llvm-project/pull/84756
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/OCHyams created
https://github.com/llvm/llvm-project/pull/84756
This patch fixes problems that pop up when clang emits DbgRecords instead of
debug intrinsics.
Note: this doesn't mean clang is emitting DbgRecords yet, because the modules
it creates are still always in the
https://github.com/OCHyams approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/75228
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/OCHyams approved this pull request.
New changes LGTM, thanks!
https://github.com/llvm/llvm-project/pull/69681
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,20 @@
+// RUN: %clang_cc1 -emit-llvm -debug-info-kind=standalone %s -o - | FileCheck
%s
+
+struct Tuple {
+ int Fld_1;
+ int Fld_2;
+};
+__attribute__((optnone)) Tuple get() { return {10, 20}; }
+
+// CHECK-LABEL: define dso_local noundef i32 @main
+// CHECK:
@@ -2,10 +2,8 @@
OCHyams wrote:
Please can you add `--implicit-check-not="call void @llvm.dbg.declare"` to the
`FileCheck` command?
https://github.com/llvm/llvm-project/pull/69681
___
cfe-commits mailing list
https://github.com/OCHyams commented:
This SGTM.
I don't think the unnamed variable serves any useful purpose but may not being
imaginative enough. I can't see any discussion on the topic when the code was
added in [D119178](https://reviews.llvm.org/D119178) . CC the author, @shafik
(or
https://github.com/OCHyams edited
https://github.com/llvm/llvm-project/pull/69681
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
58 matches
Mail list logo