summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/BPF
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Target/BPF')
-rw-r--r--llvm/lib/Target/BPF/BTFDebug.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/BPF/BTFDebug.cpp b/llvm/lib/Target/BPF/BTFDebug.cpp
index 5d1d96fa4cd..d00bc015835 100644
--- a/llvm/lib/Target/BPF/BTFDebug.cpp
+++ b/llvm/lib/Target/BPF/BTFDebug.cpp
@@ -751,7 +751,7 @@ void BTFDebug::endModule() {
const Module *M = MMI->getModule();
for (const GlobalVariable &Global : M->globals()) {
// Ignore external globals for now.
- if (Global.hasExternalLinkage())
+ if (!Global.hasInitializer() && Global.hasExternalLinkage())
continue;
SmallVector<DIGlobalVariableExpression *, 1> GVs;
OpenPOWER on IntegriCloud