[compiler-rt] r238338 - Test case for PR 23499.

Justin Bogner mail at justinbogner.com
Fri May 29 14:27:45 PDT 2015


Diego Novillo <dnovillo at google.com> writes:
> Author: dnovillo
> Date: Wed May 27 12:03:26 2015
> New Revision: 238338
>
> URL: http://llvm.org/viewvc/llvm-project?rev=238338&view=rev
> Log:
> Test case for PR 23499.

Hey Diego,

I'm not sure how I didn't notice until now, but this is actually failing
on darwin (the bots have been failing check-profile since it when in!):

http://lab.llvm.org:8080/green/job/clang-stage1-cmake-RA_check/4239/

Looks like it's having trouble linking the `extern int X`:

  Undefined symbols for architecture x86_64:
    "_X", referenced from:
        void bar<void>() in instrprof-dynamic-a-8277d7.o
        void bar<char>() in instrprof-dynamic-a-8277d7.o
  ld: symbol(s) not found for architecture x86_64
  clang-3.7: error: linker command failed with exit code 1 (use -v to see invocation)

Could you take a look?

>
> Modified:
>     compiler-rt/trunk/test/profile/Inputs/instrprof-dynamic-header.h
>     compiler-rt/trunk/test/profile/Inputs/instrprof-dynamic-main.cpp
>
> Modified: compiler-rt/trunk/test/profile/Inputs/instrprof-dynamic-header.h
> URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/profile/Inputs/instrprof-dynamic-header.h?rev=238338&r1=238337&r2=238338&view=diff
> ==============================================================================
> --- compiler-rt/trunk/test/profile/Inputs/instrprof-dynamic-header.h (original)
> +++ compiler-rt/trunk/test/profile/Inputs/instrprof-dynamic-header.h Wed May 27 12:03:26 2015
> @@ -1,5 +1,8 @@
> +extern int X;
>  template <class T> void bar() {
> -  if (true) {}
> +  if (X) {
> +    X *= 4;
> +  }
>  }
>  void a();
>  void b();
>
> Modified: compiler-rt/trunk/test/profile/Inputs/instrprof-dynamic-main.cpp
> URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/profile/Inputs/instrprof-dynamic-main.cpp?rev=238338&r1=238337&r2=238338&view=diff
> ==============================================================================
> --- compiler-rt/trunk/test/profile/Inputs/instrprof-dynamic-main.cpp (original)
> +++ compiler-rt/trunk/test/profile/Inputs/instrprof-dynamic-main.cpp Wed May 27 12:03:26 2015
> @@ -1,7 +1,9 @@
>  #include "instrprof-dynamic-header.h"
> +int X = 0;
>  void foo(int K) { if (K) {} }
>  int main(int argc, char *argv[]) {
>    foo(5);
> +  X++;
>    bar<void>();
>    a();
>    b();
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits



More information about the llvm-commits mailing list