[clang] 4ac4d4a - Revert "[clang] Add missing field to TLSModelAttr json AST dump"
Douglas Yung via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 14 16:20:13 PDT 2023
Author: Douglas Yung
Date: 2023-08-14T16:14:28-07:00
New Revision: 4ac4d4a9777e47324766aef80cfd094d06b460ec
URL: https://github.com/llvm/llvm-project/commit/4ac4d4a9777e47324766aef80cfd094d06b460ec
DIFF: https://github.com/llvm/llvm-project/commit/4ac4d4a9777e47324766aef80cfd094d06b460ec.diff
LOG: Revert "[clang] Add missing field to TLSModelAttr json AST dump"
This reverts commit 2105c32b32bf3360f524f1f3a1e5af605821eff8.
Reverting this follow-up commit as a prior commit (2107d87) is causing build bot test failures.
Added:
Modified:
clang/include/clang/AST/JSONNodeDumper.h
clang/lib/AST/JSONNodeDumper.cpp
clang/test/AST/ast-dump-attr-json.cpp
Removed:
################################################################################
diff --git a/clang/include/clang/AST/JSONNodeDumper.h b/clang/include/clang/AST/JSONNodeDumper.h
index 0ce272df8df65b..03c903069ad877 100644
--- a/clang/include/clang/AST/JSONNodeDumper.h
+++ b/clang/include/clang/AST/JSONNodeDumper.h
@@ -214,7 +214,6 @@ class JSONNodeDumper
void VisitUnavailableAttr(const UnavailableAttr *UA);
void VisitSectionAttr(const SectionAttr *SA);
void VisitVisibilityAttr(const VisibilityAttr *VA);
- void VisitTLSModelAttr(const TLSModelAttr *TA);
void VisitTypedefType(const TypedefType *TT);
void VisitUsingType(const UsingType *TT);
diff --git a/clang/lib/AST/JSONNodeDumper.cpp b/clang/lib/AST/JSONNodeDumper.cpp
index 139dfce41e914c..134938a1ef19a0 100644
--- a/clang/lib/AST/JSONNodeDumper.cpp
+++ b/clang/lib/AST/JSONNodeDumper.cpp
@@ -559,10 +559,6 @@ void JSONNodeDumper::VisitVisibilityAttr(const VisibilityAttr *VA) {
VA->getVisibility()));
}
-void JSONNodeDumper::VisitTLSModelAttr(const TLSModelAttr *TA) {
- JOS.attribute("tls_model", TA->getModel());
-}
-
void JSONNodeDumper::VisitTypedefType(const TypedefType *TT) {
JOS.attribute("decl", createBareDeclRef(TT->getDecl()));
if (!TT->typeMatchesDecl())
diff --git a/clang/test/AST/ast-dump-attr-json.cpp b/clang/test/AST/ast-dump-attr-json.cpp
index 24a5ff08887870..0eb930b851a15e 100644
--- a/clang/test/AST/ast-dump-attr-json.cpp
+++ b/clang/test/AST/ast-dump-attr-json.cpp
@@ -19,7 +19,6 @@ __attribute__ ((section ("SECTION_NAME"))) int section_var;
__attribute__ ((visibility ("hidden"))) int visibility_var;
-__thread __attribute__ ((tls_model ("local-exec"))) int tls_model_var;
// NOTE: CHECK lines have been autogenerated by gen_ast_dump_json_test.py
// using --filters=VarDecl
@@ -480,51 +479,3 @@ __thread __attribute__ ((tls_model ("local-exec"))) int tls_model_var;
// CHECK-NEXT: }
// CHECK-NEXT: ]
// CHECK-NEXT: }
-
-
-// CHECK-NOT: {{^}}Dumping
-// CHECK: "kind": "VarDecl",
-// CHECK-NEXT: "loc": {
-// CHECK-NEXT: "offset": 724,
-// CHECK-NEXT: "line": 22,
-// CHECK-NEXT: "col": 57,
-// CHECK-NEXT: "tokLen": 13
-// CHECK-NEXT: },
-// CHECK-NEXT: "range": {
-// CHECK-NEXT: "begin": {
-// CHECK-NEXT: "offset": 668,
-// CHECK-NEXT: "col": 1,
-// CHECK-NEXT: "tokLen": 8
-// CHECK-NEXT: },
-// CHECK-NEXT: "end": {
-// CHECK-NEXT: "offset": 724,
-// CHECK-NEXT: "col": 57,
-// CHECK-NEXT: "tokLen": 13
-// CHECK-NEXT: }
-// CHECK-NEXT: },
-// CHECK-NEXT: "name": "tls_model_var",
-// CHECK-NEXT: "mangledName": "tls_model_var",
-// CHECK-NEXT: "type": {
-// CHECK-NEXT: "qualType": "int"
-// CHECK-NEXT: },
-// CHECK-NEXT: "tls": "static",
-// CHECK-NEXT: "inner": [
-// CHECK-NEXT: {
-// CHECK-NEXT: "id": "0x{{.*}}",
-// CHECK-NEXT: "kind": "TLSModelAttr",
-// CHECK-NEXT: "range": {
-// CHECK-NEXT: "begin": {
-// CHECK-NEXT: "offset": 693,
-// CHECK-NEXT: "col": 26,
-// CHECK-NEXT: "tokLen": 9
-// CHECK-NEXT: },
-// CHECK-NEXT: "end": {
-// CHECK-NEXT: "offset": 716,
-// CHECK-NEXT: "col": 49,
-// CHECK-NEXT: "tokLen": 1
-// CHECK-NEXT: }
-// CHECK-NEXT: },
-// CHECK-NEXT: "tls_model": "local-exec"
-// CHECK-NEXT: }
-// CHECK-NEXT: ]
-// CHECK-NEXT: }
More information about the cfe-commits
mailing list