summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShoaib Meenai <smeenai@fb.com>2018-01-29 20:28:04 +0000
committerShoaib Meenai <smeenai@fb.com>2018-01-29 20:28:04 +0000
commit63b6a0e5bc9178115437c2c499d10116884a4581 (patch)
treebc4a4f83b3a853b188e00010e8f9d8af238e5628
parent4cbca08d71f90222803a6bd4156c5b5f2be141d9 (diff)
downloadbcm5719-llvm-63b6a0e5bc9178115437c2c499d10116884a4581.tar.gz
bcm5719-llvm-63b6a0e5bc9178115437c2c499d10116884a4581.zip
[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
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index 92429acb2b8..992eb40a025 100644
--- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -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);
OpenPOWER on IntegriCloud