diff options
author | Duncan Sands <baldrick@free.fr> | 2010-12-20 10:57:01 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2010-12-20 10:57:01 +0000 |
commit | 8e4f4390bc3e6ed0ec72281c67950f54474f915d (patch) | |
tree | 3c13b23180b7319943014adbc07e0fb18bafd78b /include/llvm/GlobalValue.h | |
parent | 784a176bc38c0dea540217dd5c7f6f0c77e89205 (diff) | |
download | external_llvm-8e4f4390bc3e6ed0ec72281c67950f54474f915d.zip external_llvm-8e4f4390bc3e6ed0ec72281c67950f54474f915d.tar.gz external_llvm-8e4f4390bc3e6ed0ec72281c67950f54474f915d.tar.bz2 |
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
Diffstat (limited to 'include/llvm/GlobalValue.h')
-rw-r--r-- | include/llvm/GlobalValue.h | 4 |
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 || |