Revert "[DWARF5]Addition of alignment atrribute in typedef DIE."
This reverts commit 423f541c1a322963cf482683fe9777ef0692082d, which
breaks llvm-c ABI.
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp
index f204b97..75c4b2a 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/lib/CodeGen/CGDebugInfo.cpp
@@ -1127,8 +1127,7 @@
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 @@
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 @@
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.