[CodeGen] Simplify conditional. NFC

Rafael pointed out that `hasInternalLinkage() || hasPrivateLinkage()` is
equivalent to `hasLocalLinkage()` in post-commit review.

I'm intentionally not updating the comment, partly because I like it
being explicit, and partly because "global symbols with local linkage"
sounds like an oxymoron.

llvm-svn: 323688
This commit is contained in:
Shoaib Meenai 2018-01-29 20:28:04 +00:00
parent 4cbca08d71
commit 63b6a0e5bc
1 changed files with 1 additions and 1 deletions

View File

@ -1459,7 +1459,7 @@ bool AsmPrinter::doFinalization(Module &M) {
// Global symbols with internal or private linkage are not visible to
// the linker, and thus would cause an error when the linker tried to
// preserve the symbol due to the `/include:` directive.
if (GV->hasInternalLinkage() || GV->hasPrivateLinkage())
if (GV->hasLocalLinkage())
continue;
raw_string_ostream OS(Flags);