diff options
| author | Rafael Espindola <rafael.espindola@gmail.com> | 2012-11-29 16:38:22 +0000 |
|---|---|---|
| committer | Rafael Espindola <rafael.espindola@gmail.com> | 2012-11-29 16:38:22 +0000 |
| commit | c12edd4e68994065469eeec742ddb12260f3d9be (patch) | |
| tree | c7bc62fbd6e65b3c531963a71eb286205a7654c1 | |
| parent | 97585178944f352c6d6ed2920c93ad85df355ddc (diff) | |
| download | bcm5719-llvm-c12edd4e68994065469eeec742ddb12260f3d9be.tar.gz bcm5719-llvm-c12edd4e68994065469eeec742ddb12260f3d9be.zip | |
Now that the underlying problem has been fixed, add r168411 back.
Original commit message:
Remove redundant code.
llvm-svn: 168900
| -rw-r--r-- | clang/lib/AST/Decl.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/clang/lib/AST/Decl.cpp b/clang/lib/AST/Decl.cpp index ed48c439b54..1f390eec05e 100644 --- a/clang/lib/AST/Decl.cpp +++ b/clang/lib/AST/Decl.cpp @@ -777,12 +777,10 @@ static LinkageInfo getLVForDecl(const NamedDecl *D, bool OnlyTemplate) { if (llvm::Optional<Visibility> Vis = Function->getExplicitVisibility()) LV.mergeVisibility(*Vis, true); } - - if (const FunctionDecl *Prev = Function->getPreviousDecl()) { - LinkageInfo PrevLV = getLVForDecl(Prev, OnlyTemplate); - if (PrevLV.linkage()) LV.setLinkage(PrevLV.linkage()); - LV.mergeVisibility(PrevLV); - } + + // Note that Sema::MergeCompatibleFunctionDecls already takes care of + // merging storage classes and visibility attributes, so we don't have to + // look at previous decls in here. return LV; } |

