mirror of
https://github.com/intel/llvm.git
synced 2026-01-20 10:18:14 +08:00
DebugInfo: Avoid unnecessarily looking up the context when the declaration is already built.
No functional change intended. llvm-svn: 201602
This commit is contained in:
@@ -1476,10 +1476,9 @@ llvm::DIType CGDebugInfo::CreateType(const RecordType *Ty) {
|
||||
// If the class is dynamic, only emit a declaration. A definition will be
|
||||
// emitted whenever the vtable is emitted.
|
||||
(CXXDecl && CXXDecl->hasDefinition() && CXXDecl->isDynamicClass())))) {
|
||||
llvm::DIDescriptor FDContext =
|
||||
getContextDescriptor(cast<Decl>(RD->getDeclContext()));
|
||||
if (!T)
|
||||
T = getOrCreateRecordFwdDecl(Ty, FDContext);
|
||||
T = getOrCreateRecordFwdDecl(
|
||||
Ty, getContextDescriptor(cast<Decl>(RD->getDeclContext())));
|
||||
return T;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user