[PATCH] D24670: Fix unresolved linker symbols from misplaced extern definitions

Chuck Atkins via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 3 09:41:09 PDT 2016


Ping?

On Sep 30, 2016 9:43 AM, "Chuck Atkins" <chuck.atkins at kitware.com> wrote:

> chuckatkins updated this revision to Diff 73043.
> chuckatkins added a comment.
>
> Adjusted code style with clang-format
>
>
> https://reviews.llvm.org/D24670
>
> Files:
>   lib/Transforms/Utils/LoopUtils.cpp
>
>
> Index: lib/Transforms/Utils/LoopUtils.cpp
> ===================================================================
> --- lib/Transforms/Utils/LoopUtils.cpp
> +++ lib/Transforms/Utils/LoopUtils.cpp
> @@ -929,6 +929,13 @@
>    return UsedOutside;
>  }
>
> +// We locally access their IDs for LoopSimplify and LCSSA here because
> +// users shouldn't directly get them from this header.
> +namespace llvm {
> +extern char &LoopSimplifyID;
> +extern char &LCSSAID;
> +}
> +
>  void llvm::getLoopAnalysisUsage(AnalysisUsage &AU) {
>    // By definition, all loop passes need the LoopInfo analysis and the
>    // Dominator tree it depends on. Because they all participate in the
> loop
> @@ -938,10 +945,7 @@
>    AU.addRequired<LoopInfoWrapperPass>();
>    AU.addPreserved<LoopInfoWrapperPass>();
>
> -  // We must also preserve LoopSimplify and LCSSA. We locally access
> their IDs
> -  // here because users shouldn't directly get them from this header.
> -  extern char &LoopSimplifyID;
> -  extern char &LCSSAID;
> +  // We must also preserve LoopSimplify and LCSSA.
>    AU.addRequiredID(LoopSimplifyID);
>    AU.addPreservedID(LoopSimplifyID);
>    AU.addRequiredID(LCSSAID);
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161003/7f10fe8f/attachment.html>


More information about the llvm-commits mailing list