From: Duncan Sands Date: Mon, 20 Dec 2010 10:57:01 +0000 (+0000) Subject: Discourage people from using isWeakForLinker when they should be using X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=8e4f4390bc3e6ed0ec72281c67950f54474f915d;p=oota-llvm.git Discourage people from using isWeakForLinker when they should be using mayBeOverridden. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122241 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/GlobalValue.h b/include/llvm/GlobalValue.h index 62e84f83351..68cb8e2604c 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 ||