aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/llvm/GlobalValue.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/llvm/GlobalValue.h b/include/llvm/GlobalValue.h
index 62e84f8..68cb8e2 100644
--- a/include/llvm/GlobalValue.h
+++ b/include/llvm/GlobalValue.h
@@ -173,7 +173,9 @@ public:
}
/// isWeakForLinker - Whether the definition of this global may be replaced at
- /// link time.
+ /// link time. NB: Using this method outside of the code generators is almost
+ /// always a mistake: when working at the IR level use mayBeOverridden instead
+ /// as it knows about ODR semantics.
static bool isWeakForLinker(LinkageTypes Linkage) {
return Linkage == AvailableExternallyLinkage ||
Linkage == WeakAnyLinkage ||