diff options
author | David Majnemer <david.majnemer@gmail.com> | 2016-07-06 21:07:53 +0000 |
---|---|---|
committer | David Majnemer <david.majnemer@gmail.com> | 2016-07-06 21:07:53 +0000 |
commit | 36a6e00d6eb653cd1f9e04572616b326d870e411 (patch) | |
tree | f628b955594e899048d372baa4465da28266d79c /clang/lib/CodeGen | |
parent | 7abd269aa9bb09dc994e68357eaed83806f24dfc (diff) | |
download | bcm5719-llvm-36a6e00d6eb653cd1f9e04572616b326d870e411.tar.gz bcm5719-llvm-36a6e00d6eb653cd1f9e04572616b326d870e411.zip |
[CodeGen, DebugInfo] Use hasLocalLinkage instead of hasInternalLinkage
For the purpose of emitting debug info, entities with private linkage
should be treated the same as internal linkage. While this doesn't
change anything in practice, it makes the code a little less confusing.
llvm-svn: 274677
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r-- | clang/lib/CodeGen/CGDebugInfo.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp index d51e1d978bb..5e829cc1229 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/lib/CodeGen/CGDebugInfo.cpp @@ -2923,7 +2923,7 @@ void CGDebugInfo::EmitFunctionStart(GlobalDecl GD, SourceLocation Loc, // are emitted as CU level entities by the backend. llvm::DISubprogram *SP = DBuilder.createFunction( FDContext, Name, LinkageName, Unit, LineNo, - getOrCreateFunctionType(D, FnType, Unit), Fn->hasInternalLinkage(), + getOrCreateFunctionType(D, FnType, Unit), Fn->hasLocalLinkage(), true /*definition*/, ScopeLine, Flags, CGM.getLangOpts().Optimize, TParamsArray.get(), getFunctionDeclaration(D)); Fn->setSubprogram(SP); @@ -3537,7 +3537,7 @@ llvm::DIGlobalVariable *CGDebugInfo::CollectAnonRecordDecls( // Use VarDecl's Tag, Scope and Line number. GV = DBuilder.createGlobalVariable(DContext, FieldName, LinkageName, Unit, LineNo, FieldTy, - Var->hasInternalLinkage(), Var, nullptr); + Var->hasLocalLinkage(), Var, nullptr); } return GV; } @@ -3570,7 +3570,7 @@ void CGDebugInfo::EmitGlobalVariable(llvm::GlobalVariable *Var, } else { GV = DBuilder.createGlobalVariable( DContext, DeclName, LinkageName, Unit, LineNo, getOrCreateType(T, Unit), - Var->hasInternalLinkage(), Var, + Var->hasLocalLinkage(), Var, getOrCreateStaticDataMemberDeclarationOrNull(D)); } DeclCache[D->getCanonicalDecl()].reset(static_cast<llvm::Metadata *>(GV)); |