summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index 87d91377dc9..92429acb2b8 100644
--- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -1456,10 +1456,10 @@ bool AsmPrinter::doFinalization(Module &M) {
for (const Value *Op : A->operands()) {
const auto *GV =
cast<GlobalValue>(Op->stripPointerCastsNoFollowAliases());
- // Global symbols with internal 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())
+ // 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())
continue;
raw_string_ostream OS(Flags);
OpenPOWER on IntegriCloud