4ntoine / clang

AVR frontend for the LLVM project
http://clang.llvm.org/
Other
9 stars 1 forks source link

Inherited a bug from upstream #15

Open RandomInsano opened 9 years ago

RandomInsano commented 9 years ago

Two errors popped up in Targets.cpp (see below). The good news is that both of them have something to do with GPUs or OpenCL, so this is definitely not your problem. You may need to find the fix upstream or do a fetch + rebase.

Here's the build output:

make[3]: Nothing to be done for `all'.
llvm[3]: Compiling Targets.cpp for Debug+Asserts build
/Users/edwinamsler/Documents/Code/Personal/llvm-avr/avr-llvm/tools/clang/lib/Basic/Targets.cpp:1422:20: error: assigning to
      'const LangAS::Map *' (aka 'unsigned int const (*)[7]') from incompatible type 'const unsigned int (*)[6]'
      AddrSpaceMap = &NVPTXAddrSpaceMap;
                   ^ ~~~~~~~~~~~~~~~~~~
/Users/edwinamsler/Documents/Code/Personal/llvm-avr/avr-llvm/tools/clang/lib/Basic/Targets.cpp:6027:20: error: assigning to
      'const LangAS::Map *' (aka 'unsigned int const (*)[7]') from incompatible type 'const unsigned int (*)[6]'
      AddrSpaceMap = &TCEOpenCLAddrSpaceMap;
                   ^ ~~~~~~~~~~~~~~~~~~~~~~
2 errors generated.
make[3]: *** [/Users/edwinamsler/Documents/Code/Personal/llvm-avr/avr-llvm/build/tools/clang/lib/Basic/Debug+Asserts/Targets.o] Error 1
make[2]: *** [Basic/.makeall] Error 2
make[1]: *** [all] Error 1
make: *** [clang/.makeall] Error 2
4ntoine commented 9 years ago

Hi, Edwin.

Yes, errors from upstream happen. Actually i don't pull changes from upstream frequently. I can add you to collaborators or you can fork the project in order not to be stopped.

4ntoine commented 9 years ago

It seems that most AVR work is done in dylan's fork so i'd suggest to help him with it if you wish..

RandomInsano commented 9 years ago

I don't really understand the problem at the moment (it seems to be some fancy enum type thing). If I ever figure it out, I'll fork and open a pull request.

dylanmckay commented 9 years ago

When manually updating @4ntoine's fork, I got this error as well. After merging upstream, clang's Targets.cpp gets a variant added to two different enums. When I checkout avr-support and git merge master, all changes except this get merged.

This is not supposed to happen. I manually added the unmerged code in, and then it worked.

I'll send a fix momentarily.

dylanmckay commented 9 years ago

Actually, the variants exist in the current master branch of LLVM.

I believe the error is caused by an incorrect merge by @4ntoine .

See clang/master: Targets.cpp

See clang/avr-support: Targets.cpp

avr-support should have these changes merged, but it hasn't.

I'm going to move all of the repos to a new organisation, and fix all of the problems.

dylanmckay commented 9 years ago

I've fixed this issue in avr-llvm/clang