Debug Info: Remove an unnecessary debug type visitor.

Thanks to dblaikie for spotting this.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@247303 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Adrian Prantl 2015-09-10 17:13:31 +00:00
Родитель 298c9cbb3d
Коммит 4e5a4032df
2 изменённых файлов: 4 добавлений и 10 удалений

Просмотреть файл

@ -70,13 +70,6 @@ class PCHContainerGenerator : public ASTConsumer {
return true; return true;
} }
bool VisitValueDecl(ValueDecl *D) {
QualType QualTy = D->getType();
if (!QualTy.isNull() && CanRepresent(QualTy.getTypePtr()))
DI.getOrCreateStandaloneType(QualTy, D->getLocation());
return true;
}
bool VisitObjCInterfaceDecl(ObjCInterfaceDecl *D) { bool VisitObjCInterfaceDecl(ObjCInterfaceDecl *D) {
QualType QualTy(D->getTypeForDecl(), 0); QualType QualTy(D->getTypeForDecl(), 0);
if (!QualTy.isNull() && CanRepresent(QualTy.getTypePtr())) if (!QualTy.isNull() && CanRepresent(QualTy.getTypePtr()))

Просмотреть файл

@ -7,10 +7,12 @@
// RUN: rm -rf %t // RUN: rm -rf %t
// RUN: %clang_cc1 -triple %itanium_abi_triple -x objective-c++ -std=c++11 -g -fmodules -fmodule-format=obj -fimplicit-module-maps -DMODULES -fmodules-cache-path=%t %s -I %S/Inputs -I %t -emit-llvm -o %t.ll -mllvm -debug-only=pchcontainer &>%t-mod.ll // RUN: %clang_cc1 -triple %itanium_abi_triple -x objective-c++ -std=c++11 -g -fmodules -fmodule-format=obj -fimplicit-module-maps -DMODULES -fmodules-cache-path=%t %s -I %S/Inputs -I %t -emit-llvm -o %t.ll -mllvm -debug-only=pchcontainer &>%t-mod.ll
// RUN: cat %t-mod.ll | FileCheck %s // RUN: cat %t-mod.ll | FileCheck %s
// RUN: cat %t-mod.ll | FileCheck --check-prefix=CHECK-NEG %s
// PCH: // PCH:
// RUN: %clang_cc1 -triple %itanium_abi_triple -x c++ -std=c++11 -emit-pch -fmodule-format=obj -I %S/Inputs -o %t.pch %S/Inputs/DebugCXX.h -mllvm -debug-only=pchcontainer &>%t-pch.ll // RUN: %clang_cc1 -triple %itanium_abi_triple -x c++ -std=c++11 -emit-pch -fmodule-format=obj -I %S/Inputs -o %t.pch %S/Inputs/DebugCXX.h -mllvm -debug-only=pchcontainer &>%t-pch.ll
// RUN: cat %t-pch.ll | FileCheck %s // RUN: cat %t-pch.ll | FileCheck %s
// RUN: cat %t-mod.ll | FileCheck --check-prefix=CHECK-NEG %s
#ifdef MODULES #ifdef MODULES
@import DebugCXX; @import DebugCXX;
@ -30,12 +32,11 @@
// CHECK: !DICompositeType(tag: DW_TAG_class_type, // CHECK: !DICompositeType(tag: DW_TAG_class_type,
// CHECK-SAME: name: "Template<float, DebugCXX::traits<float> >" // CHECK-SAME: name: "Template<float, DebugCXX::traits<float> >"
// CHECK-SAME: identifier: "_ZTSN8DebugCXX8TemplateIfNS_6traitsIfEEEE") // CHECK-SAME: identifier: "_ZTSN8DebugCXX8TemplateIfNS_6traitsIfEEEE")
// CHECK: !DICompositeType(tag: DW_TAG_class_type,
// CHECK-SAME: name: "Template<long, DebugCXX::traits<long> >"
// CHECK-SAME: identifier: "_ZTSN8DebugCXX8TemplateIlNS_6traitsIlEEEE")
// CHECK: !DICompositeType(tag: DW_TAG_class_type, name: "A<void>" // CHECK: !DICompositeType(tag: DW_TAG_class_type, name: "A<void>"
// CHECK-SAME: identifier: "_ZTSN8DebugCXX1AIJvEEE") // CHECK-SAME: identifier: "_ZTSN8DebugCXX1AIJvEEE")
// CHECK: !DIDerivedType(tag: DW_TAG_typedef, name: "FloatInstatiation" // CHECK: !DIDerivedType(tag: DW_TAG_typedef, name: "FloatInstatiation"
// no mangled name here yet. // no mangled name here yet.
// CHECK: !DIDerivedType(tag: DW_TAG_typedef, name: "B", // CHECK: !DIDerivedType(tag: DW_TAG_typedef, name: "B",
// no mangled name here yet. // no mangled name here yet.
// CHECK-NEG-NOT: "_ZTSN8DebugCXX8TemplateIlNS_6traitsIlEEEE"