forked from OSchip/llvm-project
80-column fixup after recent change to getOrCreateType.
llvm-svn: 183586
This commit is contained in:
parent
ae3a4dfac0
commit
1ecc5634d6
|
@ -501,7 +501,8 @@ llvm::DIType CGDebugInfo::CreateType(const ComplexType *Ty) {
|
|||
|
||||
/// CreateCVRType - Get the qualified type from the cache or create
|
||||
/// a new one if necessary.
|
||||
llvm::DIType CGDebugInfo::CreateQualifiedType(QualType Ty, llvm::DIFile Unit, bool Declaration) {
|
||||
llvm::DIType CGDebugInfo::CreateQualifiedType(QualType Ty, llvm::DIFile Unit,
|
||||
bool Declaration) {
|
||||
QualifierCollector Qc;
|
||||
const Type *T = Qc.strip(Ty);
|
||||
|
||||
|
@ -527,7 +528,8 @@ llvm::DIType CGDebugInfo::CreateQualifiedType(QualType Ty, llvm::DIFile Unit, bo
|
|||
return getOrCreateType(QualType(T, 0), Unit);
|
||||
}
|
||||
|
||||
llvm::DIType FromTy = getOrCreateType(Qc.apply(CGM.getContext(), T), Unit, Declaration);
|
||||
llvm::DIType FromTy =
|
||||
getOrCreateType(Qc.apply(CGM.getContext(), T), Unit, Declaration);
|
||||
|
||||
// No need to fill in the Name, Line, Size, Alignment, Offset in case of
|
||||
// CVR derived types.
|
||||
|
@ -1921,7 +1923,8 @@ llvm::Value *CGDebugInfo::getCachedInterfaceTypeOrNull(QualType Ty) {
|
|||
|
||||
/// getOrCreateType - Get the type from the cache or create a new
|
||||
/// one if necessary.
|
||||
llvm::DIType CGDebugInfo::getOrCreateType(QualType Ty, llvm::DIFile Unit, bool Declaration) {
|
||||
llvm::DIType CGDebugInfo::getOrCreateType(QualType Ty, llvm::DIFile Unit,
|
||||
bool Declaration) {
|
||||
if (Ty.isNull())
|
||||
return llvm::DIType();
|
||||
|
||||
|
@ -1974,8 +1977,7 @@ llvm::DIType CGDebugInfo::getOrCreateType(QualType Ty, llvm::DIFile Unit, bool D
|
|||
|
||||
/// Currently the checksum of an interface includes the number of
|
||||
/// ivars and property accessors.
|
||||
unsigned CGDebugInfo::Checksum(const ObjCInterfaceDecl
|
||||
*ID) {
|
||||
unsigned CGDebugInfo::Checksum(const ObjCInterfaceDecl *ID) {
|
||||
// The assumption is that the number of ivars can only increase
|
||||
// monotonically, so it is safe to just use their current number as
|
||||
// a checksum.
|
||||
|
@ -2000,7 +2002,8 @@ ObjCInterfaceDecl *CGDebugInfo::getObjCInterfaceDecl(QualType Ty) {
|
|||
}
|
||||
|
||||
/// CreateTypeNode - Create a new debug type node.
|
||||
llvm::DIType CGDebugInfo::CreateTypeNode(QualType Ty, llvm::DIFile Unit, bool Declaration) {
|
||||
llvm::DIType CGDebugInfo::CreateTypeNode(QualType Ty, llvm::DIFile Unit,
|
||||
bool Declaration) {
|
||||
// Handle qualifiers, which recursively handles what they refer to.
|
||||
if (Ty.hasLocalQualifiers())
|
||||
return CreateQualifiedType(Ty, Unit, Declaration);
|
||||
|
@ -3011,10 +3014,11 @@ void CGDebugInfo::EmitGlobalVariable(llvm::GlobalVariable *Var,
|
|||
LinkageName = StringRef();
|
||||
llvm::DIDescriptor DContext =
|
||||
getContextDescriptor(dyn_cast<Decl>(D->getDeclContext()));
|
||||
llvm::DIGlobalVariable GV = DBuilder.createStaticVariable(DContext, DeclName, LinkageName,
|
||||
Unit, LineNo, getOrCreateType(T, Unit),
|
||||
Var->hasInternalLinkage(), Var,
|
||||
getStaticDataMemberDeclaration(D));
|
||||
llvm::DIGlobalVariable GV =
|
||||
DBuilder.createStaticVariable(DContext, DeclName, LinkageName, Unit,
|
||||
LineNo, getOrCreateType(T, Unit),
|
||||
Var->hasInternalLinkage(), Var,
|
||||
getStaticDataMemberDeclaration(D));
|
||||
DeclCache.insert(std::make_pair(D->getCanonicalDecl(), llvm::WeakVH(GV)));
|
||||
}
|
||||
|
||||
|
@ -3060,10 +3064,10 @@ void CGDebugInfo::EmitGlobalVariable(const ValueDecl *VD,
|
|||
// Do not use DIGlobalVariable for enums.
|
||||
if (Ty.getTag() == llvm::dwarf::DW_TAG_enumeration_type)
|
||||
return;
|
||||
llvm::DIGlobalVariable GV = DBuilder.createStaticVariable(Unit, Name, Name, Unit,
|
||||
getLineNumber(VD->getLocation()),
|
||||
Ty, true, Init,
|
||||
getStaticDataMemberDeclaration(VD));
|
||||
llvm::DIGlobalVariable GV =
|
||||
DBuilder.createStaticVariable(Unit, Name, Name, Unit,
|
||||
getLineNumber(VD->getLocation()), Ty, true,
|
||||
Init, getStaticDataMemberDeclaration(VD));
|
||||
DeclCache.insert(std::make_pair(VD->getCanonicalDecl(), llvm::WeakVH(GV)));
|
||||
}
|
||||
|
||||
|
@ -3090,7 +3094,8 @@ void CGDebugInfo::EmitUsingDecl(const UsingDecl &UD) {
|
|||
// Emitting one decl is sufficient - debuggers can detect that this is an
|
||||
// overloaded name & provide lookup for all the overloads.
|
||||
const UsingShadowDecl &USD = **UD.shadow_begin();
|
||||
if (llvm::DIDescriptor Target = getDeclarationOrDefinition(USD.getUnderlyingDecl()))
|
||||
if (llvm::DIDescriptor Target =
|
||||
getDeclarationOrDefinition(USD.getUnderlyingDecl()))
|
||||
DBuilder.createImportedDeclaration(
|
||||
getCurrentContextDescriptor(cast<Decl>(USD.getDeclContext())), Target,
|
||||
getLineNumber(USD.getLocation()));
|
||||
|
|
Loading…
Reference in New Issue