diff options
Diffstat (limited to 'clang')
-rw-r--r-- | clang/lib/CodeGen/CGDebugInfo.cpp | 13 | ||||
-rw-r--r-- | clang/test/CodeGenCXX/debug-info-template-align.cpp | 14 |
2 files changed, 5 insertions, 22 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp index f204b971692..75c4b2ae233 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/lib/CodeGen/CGDebugInfo.cpp @@ -1127,8 +1127,7 @@ llvm::DIType *CGDebugInfo::CreateType(const TemplateSpecializationType *Ty, SourceLocation Loc = AliasDecl->getLocation(); return DBuilder.createTypedef(Src, OS.str(), getOrCreateFile(Loc), getLineNumber(Loc), - getDeclContextDescriptor(AliasDecl), - /* Alignment */ None); + getDeclContextDescriptor(AliasDecl)); } llvm::DIType *CGDebugInfo::CreateType(const TypedefType *Ty, @@ -1144,10 +1143,9 @@ llvm::DIType *CGDebugInfo::CreateType(const TypedefType *Ty, SourceLocation Loc = Ty->getDecl()->getLocation(); // Typedefs are derived from some other type. - return DBuilder.createTypedef( - Underlying, Ty->getDecl()->getName(), getOrCreateFile(Loc), - getLineNumber(Loc), getDeclContextDescriptor(Ty->getDecl()), - getDeclAlignIfRequired(Ty->getDecl(), CGM.getContext())); + return DBuilder.createTypedef(Underlying, Ty->getDecl()->getName(), + getOrCreateFile(Loc), getLineNumber(Loc), + getDeclContextDescriptor(Ty->getDecl())); } static unsigned getDwarfCC(CallingConv CC) { @@ -2326,8 +2324,7 @@ llvm::DIType *CGDebugInfo::CreateType(const ObjCTypeParamType *Ty, return DBuilder.createTypedef( getOrCreateType(Ty->getDecl()->getUnderlyingType(), Unit), Ty->getDecl()->getName(), getOrCreateFile(Loc), getLineNumber(Loc), - getDeclContextDescriptor(Ty->getDecl()), - /* Alignment */ None); + getDeclContextDescriptor(Ty->getDecl())); } /// \return true if Getter has the default name for the property PD. diff --git a/clang/test/CodeGenCXX/debug-info-template-align.cpp b/clang/test/CodeGenCXX/debug-info-template-align.cpp deleted file mode 100644 index 42fdb269a30..00000000000 --- a/clang/test/CodeGenCXX/debug-info-template-align.cpp +++ /dev/null @@ -1,14 +0,0 @@ -// Test for debug info related to DW_AT_alignment attribute in the typedef operator -// Supported: -O0, standalone DI -// RUN: %clang_cc1 -dwarf-version=5 -emit-llvm -triple x86_64-linux-gnu %s -o - \ -// RUN: -O0 -disable-llvm-passes \ -// RUN: -debug-info-kind=standalone \ -// RUN: | FileCheck %s - -// CHECK: DIDerivedType(tag: DW_TAG_typedef, {{.*}}, align: 512 - -typedef char __attribute__((__aligned__(64))) alchar; - -int main() { - alchar newChar; -} |