[llvm] r281134 - [LTO] Handle null GV in Symbol object
Teresa Johnson via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 9 23:27:34 PDT 2016
Test case was accidentally left out of commit, added it in r281135.
On Fri, Sep 9, 2016 at 11:15 PM, Teresa Johnson via llvm-commits <
llvm-commits at lists.llvm.org> wrote:
> Author: tejohnson
> Date: Sat Sep 10 01:15:26 2016
> New Revision: 281134
>
> URL: http://llvm.org/viewvc/llvm-project?rev=281134&view=rev
> Log:
> [LTO] Handle null GV in Symbol object
>
> Similar to other Symbol methods, have Symbol::getComdat handle
> a null GV gracefully.
>
> Fixes PR30326.
>
> Modified:
> llvm/trunk/include/llvm/LTO/LTO.h
>
> Modified: llvm/trunk/include/llvm/LTO/LTO.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/
> llvm/LTO/LTO.h?rev=281134&r1=281133&r2=281134&view=diff
> ============================================================
> ==================
> --- llvm/trunk/include/llvm/LTO/LTO.h (original)
> +++ llvm/trunk/include/llvm/LTO/LTO.h Sat Sep 10 01:15:26 2016
> @@ -165,6 +165,8 @@ public:
> return GV && llvm::canBeOmittedFromSymbolTable(GV);
> }
> Expected<const Comdat *> getComdat() const {
> + if (!GV)
> + return nullptr;
> const GlobalObject *GO;
> if (auto *GA = dyn_cast<GlobalAlias>(GV)) {
> GO = GA->getBaseObject();
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
--
Teresa Johnson | Software Engineer | tejohnson at google.com | 408-460-2413
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160909/a8d29aa5/attachment.html>
More information about the llvm-commits
mailing list