Skip to content

Commit 967540b

Browse files
committed
Revert "Non constant size and offset in DWARF (llvm#141106)"
Need dbg team to land this patch This reverts commit 3b90597.
1 parent 8ef76c7 commit 967540b

File tree

14 files changed

+315
-1051
lines changed

14 files changed

+315
-1051
lines changed

clang/lib/CodeGen/CGDebugInfo.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -891,8 +891,8 @@ llvm::DIType *CGDebugInfo::CreateType(const BuiltinType *BT) {
891891
auto *ISATy = DBuilder.createPointerType(ClassTy, Size);
892892

893893
ObjTy = DBuilder.createStructType(TheCU, "objc_object", TheCU->getFile(), 0,
894-
(uint64_t)0, 0, llvm::DINode::FlagZero,
895-
nullptr, llvm::DINodeArray());
894+
0, 0, llvm::DINode::FlagZero, nullptr,
895+
llvm::DINodeArray());
896896

897897
DBuilder.replaceArrays(
898898
ObjTy, DBuilder.getOrCreateArray(&*DBuilder.createMemberType(

llvm/include/llvm/IR/DIBuilder.h

Lines changed: 0 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -376,22 +376,6 @@ namespace llvm {
376376
uint32_t VBPtrOffset,
377377
DINode::DIFlags Flags);
378378

379-
/// Create debugging information entry for a member.
380-
/// \param Scope Member scope.
381-
/// \param Name Member name.
382-
/// \param File File where this member is defined.
383-
/// \param LineNo Line number.
384-
/// \param SizeInBits Member size.
385-
/// \param AlignInBits Member alignment.
386-
/// \param OffsetInBits Member offset.
387-
/// \param Flags Flags to encode member attribute, e.g. private
388-
/// \param Ty Parent type.
389-
/// \param Annotations Member annotations.
390-
LLVM_ABI DIDerivedType *createMemberType(
391-
DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNo,
392-
Metadata *SizeInBits, uint32_t AlignInBits, Metadata *OffsetInBits,
393-
DINode::DIFlags Flags, DIType *Ty, DINodeArray Annotations = nullptr);
394-
395379
/// Create debugging information entry for a member.
396380
/// \param Scope Member scope.
397381
/// \param Name Member name.
@@ -444,23 +428,6 @@ namespace llvm {
444428
Constant *Discriminant,
445429
DIType *Ty);
446430

447-
/// Create debugging information entry for a bit field member.
448-
/// \param Scope Member scope.
449-
/// \param Name Member name.
450-
/// \param File File where this member is defined.
451-
/// \param LineNo Line number.
452-
/// \param SizeInBits Member size.
453-
/// \param OffsetInBits Member offset.
454-
/// \param StorageOffsetInBits Member storage offset.
455-
/// \param Flags Flags to encode member attribute.
456-
/// \param Ty Parent type.
457-
/// \param Annotations Member annotations.
458-
LLVM_ABI DIDerivedType *createBitFieldMemberType(
459-
DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNo,
460-
Metadata *SizeInBits, Metadata *OffsetInBits,
461-
uint64_t StorageOffsetInBits, DINode::DIFlags Flags, DIType *Ty,
462-
DINodeArray Annotations = nullptr);
463-
464431
/// Create debugging information entry for a bit field member.
465432
/// \param Scope Member scope.
466433
/// \param Name Member name.
@@ -552,29 +519,6 @@ namespace llvm {
552519
unsigned RunTimeLang = 0, DIType *VTableHolder = nullptr,
553520
MDNode *TemplateParms = nullptr, StringRef UniqueIdentifier = "");
554521

555-
/// Create debugging information entry for a struct.
556-
/// \param Scope Scope in which this struct is defined.
557-
/// \param Name Struct name.
558-
/// \param File File where this member is defined.
559-
/// \param LineNumber Line number.
560-
/// \param SizeInBits Member size.
561-
/// \param AlignInBits Member alignment.
562-
/// \param Flags Flags to encode member attribute, e.g. private
563-
/// \param Elements Struct elements.
564-
/// \param RunTimeLang Optional parameter, Objective-C runtime version.
565-
/// \param UniqueIdentifier A unique identifier for the struct.
566-
/// \param Specification The type that this type completes. This is used by
567-
/// Swift to represent generic types.
568-
/// \param NumExtraInhabitants The number of extra inhabitants of the type.
569-
/// An extra inhabitant is a bit pattern that does not represent a valid
570-
/// value for instances of a given type. This is used by the Swift language.
571-
LLVM_ABI DICompositeType *createStructType(
572-
DIScope *Scope, StringRef Name, DIFile *File, unsigned LineNumber,
573-
Metadata *SizeInBits, uint32_t AlignInBits, DINode::DIFlags Flags,
574-
DIType *DerivedFrom, DINodeArray Elements, unsigned RunTimeLang = 0,
575-
DIType *VTableHolder = nullptr, StringRef UniqueIdentifier = "",
576-
DIType *Specification = nullptr, uint32_t NumExtraInhabitants = 0);
577-
578522
/// Create debugging information entry for a struct.
579523
/// \param Scope Scope in which this struct is defined.
580524
/// \param Name Struct name.

0 commit comments

Comments
 (0)