[LLVMdev] GetElementPtr for packed types and VS build

Morten Ofstad morten at hue.no
Wed Dec 1 06:10:49 PST 2004


As I was working with packed types it became apparent that I sometimes 
need to access individual elements - I fixed this by implementing GEP 
for packed types with just 2 small patches.

When I updated from the CVS today after about 2 weeks, I got a lot of 
problems with the VS build. I will send the updated project files 
directly to Reid so he can check them in as they are rather large. There 
is also one more issue which prevents the CVS version from compiling - 
in lib/ExecutionEngine/JIT/JITEmitter.cpp line 266 there is:

if (GlobalVariable *GV = dyn_cast<GlobalVariable>(V)) {
     GlobalVariable *GV = cast<GlobalVariable>(V);
     .
     .

This is obviously nonsense and is an error with the VS compiler since GV 
is being defined twice in the same scope using it's non-standard scoping 
rules. Just delete the line with the cast and it's fine...

m.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: packedGEP.patch
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20041201/486efb27/attachment.ksh>


More information about the llvm-dev mailing list