forked from llvm-mirror/llvm
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resubmit "[pdb] Change type visitor pattern to be dynamic."
There was a regression introduced during type stream merging when visiting a field list record. This has been fixed in this patch. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272929 91177308-0d34-0410-b5e6-96231b3b80d8
- Loading branch information
Zachary Turner
committed
Jun 16, 2016
1 parent
1f4afa2
commit e8d381d
Showing
14 changed files
with
483 additions
and
387 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
//===- TypeVisitorCallbacks.h -----------------------------------*- C++ -*-===// | ||
// | ||
// The LLVM Compiler Infrastructure | ||
// | ||
// This file is distributed under the University of Illinois Open Source | ||
// License. See LICENSE.TXT for details. | ||
// | ||
//===----------------------------------------------------------------------===// | ||
|
||
#ifndef LLVM_DEBUGINFO_CODEVIEW_TYPEVISITORCALLBACKS_H | ||
#define LLVM_DEBUGINFO_CODEVIEW_TYPEVISITORCALLBACKS_H | ||
|
||
#include "llvm/ADT/ArrayRef.h" | ||
#include "llvm/DebugInfo/CodeView/CodeView.h" | ||
#include "llvm/Support/Error.h" | ||
|
||
namespace llvm { | ||
namespace codeview { | ||
class TypeVisitorCallbacks { | ||
friend class CVTypeVisitor; | ||
|
||
public: | ||
virtual ~TypeVisitorCallbacks() {} | ||
|
||
/// Action to take on unknown types. By default, they are ignored. | ||
virtual Error visitUnknownType(const CVRecord<TypeLeafKind> &Record) { | ||
return Error::success(); | ||
} | ||
virtual Error visitUnknownMember(const CVRecord<TypeLeafKind> &Record) { | ||
return Error::success(); | ||
} | ||
|
||
/// Paired begin/end actions for all types. Receives all record data, | ||
/// including the fixed-length record prefix. | ||
virtual Error visitTypeBegin(const CVRecord<TypeLeafKind> &Record) { | ||
return Error::success(); | ||
} | ||
virtual Error visitTypeEnd(const CVRecord<TypeLeafKind> &Record) { | ||
return Error::success(); | ||
} | ||
|
||
virtual Error visitFieldListBegin(const CVRecord<TypeLeafKind> &Record) { | ||
return Error::success(); | ||
} | ||
|
||
virtual Error visitFieldListEnd(const CVRecord<TypeLeafKind> &Record) { | ||
return Error::success(); | ||
} | ||
|
||
#define TYPE_RECORD(EnumName, EnumVal, Name) \ | ||
virtual Error visit##Name(Name##Record &Record) { return Error::success(); } | ||
#define MEMBER_RECORD(EnumName, EnumVal, Name) \ | ||
TYPE_RECORD(EnumName, EnumVal, Name) | ||
#define TYPE_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName) | ||
#define MEMBER_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName) | ||
#include "TypeRecords.def" | ||
}; | ||
} | ||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.