mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-27 14:24:40 +00:00
DIBuilder: retain a type when created with a unique identifier.
createClassType, createStructType, createUnionType, createEnumerationType, and createForwardDecl will retain a type when created with a unique identifier, to make sure they are treated as used even when all uses are replaced with the identifiers. Use TrackingVH<MDNode> instead of MDNode in AllRetainTypes, since the created node can later be updated. The change will be tested when clients of DIBuilder start to pass in non-empty unique identifier. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189621 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -18,6 +18,7 @@
|
||||
#include "llvm/ADT/ArrayRef.h"
|
||||
#include "llvm/ADT/StringRef.h"
|
||||
#include "llvm/Support/DataTypes.h"
|
||||
#include "llvm/Support/ValueHandle.h"
|
||||
|
||||
namespace llvm {
|
||||
class BasicBlock;
|
||||
@ -65,7 +66,9 @@ namespace llvm {
|
||||
Function *ValueFn; // llvm.dbg.value
|
||||
|
||||
SmallVector<Value *, 4> AllEnumTypes;
|
||||
SmallVector<Value *, 4> AllRetainTypes;
|
||||
/// Use TrackingVH to collect RetainTypes, since they can be updated
|
||||
/// later on.
|
||||
SmallVector<TrackingVH<MDNode>, 4> AllRetainTypes;
|
||||
SmallVector<Value *, 4> AllSubprograms;
|
||||
SmallVector<Value *, 4> AllGVs;
|
||||
SmallVector<Value *, 4> AllImportedModules;
|
||||
|
Reference in New Issue
Block a user