This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG5b54cf1a2892: [clang][Interp] Unify visiting variable
declarations (authored by tbaeder).
Changed prior to commit:
https://reviews.llvm.org/D13681
tbaeder added inline comments.
Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:1218
+auto GlobalIndex = P.getGlobal(VD);
+assert(GlobalIndex); // visitVarDecl() didn't return false.
+if (!this->emitGetPtrGlobal(*GlobalIndex, VD))
shafik wrote:
>
shafik accepted this revision.
shafik added a comment.
LGTM
Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:1218
+auto GlobalIndex = P.getGlobal(VD);
+assert(GlobalIndex); // visitVarDecl() didn't return false.
+if (!this->emitGetPtrGlobal(*GlobalIndex, VD))
--
aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.
LGTM!
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136815/new/
https://reviews.llvm.org/D136815
___
cfe-commits mailing lis
tbaeder updated this revision to Diff 479526.
tbaeder added a comment.
Meh, just use an assert :|
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136815/new/
https://reviews.llvm.org/D136815
Files:
clang/lib/AST/Interp/ByteCodeExprGen.cpp
clang/lib/AST/Interp/ByteCodeExprGen.h
clan
erichkeane added inline comments.
Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:1127
return false;
- if (!this->emitInitGlobal(*T, *I, VD))
+}
+ } else {
aaron.ballman wrote:
> tbaeder wrote:
> > aaron.ballman wrote:
> > > tbaeder wrote:
aaron.ballman added inline comments.
Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:1127
return false;
- if (!this->emitInitGlobal(*T, *I, VD))
+}
+ } else {
tbaeder wrote:
> aaron.ballman wrote:
> > tbaeder wrote:
> > > aaron.ballman wro
tbaeder updated this revision to Diff 479294.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136815/new/
https://reviews.llvm.org/D136815
Files:
clang/lib/AST/Interp/ByteCodeExprGen.cpp
clang/lib/AST/Interp/ByteCodeExprGen.h
clang/lib/AST/Interp/ByteCodeStmtGen.cpp
clang/lib/AST/I
tbaeder marked 4 inline comments as done.
tbaeder added inline comments.
Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:1127
return false;
- if (!this->emitInitGlobal(*T, *I, VD))
+}
+ } else {
aaron.ballman wrote:
> tbaeder wrote:
> > aa
aaron.ballman added inline comments.
Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:1127
return false;
- if (!this->emitInitGlobal(*T, *I, VD))
+}
+ } else {
tbaeder wrote:
> aaron.ballman wrote:
> > and if we have no `GlobalIndex`?
> >
tbaeder updated this revision to Diff 479219.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136815/new/
https://reviews.llvm.org/D136815
Files:
clang/lib/AST/Interp/ByteCodeExprGen.cpp
clang/lib/AST/Interp/ByteCodeExprGen.h
clang/lib/AST/Interp/ByteCodeStmtGen.cpp
clang/lib/AST/I
tbaeder marked 3 inline comments as done.
tbaeder added inline comments.
Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:1127
return false;
- if (!this->emitInitGlobal(*T, *I, VD))
+}
+ } else {
aaron.ballman wrote:
> and if we have no `Gl
aaron.ballman added inline comments.
Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:803
+ // Make sure we don't accidentally register the same decl twice.
+ if (auto *VD = dyn_cast_if_present(Src.dyn_cast()))
{
+assert(!P.getGlobal(VD));
=
tbaeder added a comment.
Ping
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136815/new/
https://reviews.llvm.org/D136815
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
tbaeder added a comment.
Ping
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136815/new/
https://reviews.llvm.org/D136815
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
tbaeder added a comment.
Ping
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136815/new/
https://reviews.llvm.org/D136815
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
tbaeder added inline comments.
Comment at: clang/lib/AST/Interp/ByteCodeExprGen.h:282
+ bool isGlobalDecl(const VarDecl *VD) const {
+return !VD->hasLocalStorage() || VD->isConstexpr();
+ }
shafik wrote:
> tbaeder wrote:
> > shafik wrote:
> > > tbaeder wrot
shafik added inline comments.
Comment at: clang/lib/AST/Interp/ByteCodeExprGen.h:282
+ bool isGlobalDecl(const VarDecl *VD) const {
+return !VD->hasLocalStorage() || VD->isConstexpr();
+ }
tbaeder wrote:
> shafik wrote:
> > tbaeder wrote:
> > > shafik wrote
tbaeder added inline comments.
Comment at: clang/lib/AST/Interp/ByteCodeExprGen.h:282
+ bool isGlobalDecl(const VarDecl *VD) const {
+return !VD->hasLocalStorage() || VD->isConstexpr();
+ }
shafik wrote:
> tbaeder wrote:
> > shafik wrote:
> > > Why not `has
shafik added inline comments.
Comment at: clang/lib/AST/Interp/ByteCodeExprGen.h:282
+ bool isGlobalDecl(const VarDecl *VD) const {
+return !VD->hasLocalStorage() || VD->isConstexpr();
+ }
tbaeder wrote:
> shafik wrote:
> > Why not `hasGlobalStorage()`?
> >
tbaeder updated this revision to Diff 471906.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136815/new/
https://reviews.llvm.org/D136815
Files:
clang/lib/AST/Interp/ByteCodeExprGen.cpp
clang/lib/AST/Interp/ByteCodeExprGen.h
clang/lib/AST/Interp/ByteCodeStmtGen.cpp
clang/lib/AST/I
tbaeder added inline comments.
Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:803
+ // Make sure we don't accidentally register the same decl twice.
+ if (const Decl *VD = Src.dyn_cast(); VD && isa(VD))
{
+assert(!P.getGlobal(cast(VD)));
shafik wrote
tbaeder updated this revision to Diff 471905.
tbaeder marked an inline comment as done.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136815/new/
https://reviews.llvm.org/D136815
Files:
clang/lib/AST/Interp/ByteCodeExprGen.cpp
clang/lib/AST/Interp/ByteCodeExprGen.h
clang/lib/AST/In
shafik added inline comments.
Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:803
+ // Make sure we don't accidentally register the same decl twice.
+ if (const Decl *VD = Src.dyn_cast(); VD && isa(VD))
{
+assert(!P.getGlobal(cast(VD)));
Nitpick, I fi
24 matches
Mail list logo