[llvm-commits] [llvm] r114856 - in /llvm/trunk/lib/Target/ARM: ARMELFWriterInfo.cpp ARMELFWriterInfo.h ARMSubtarget.h ARMTargetMachine.cpp ARMTargetMachine.h CMakeLists.txt
Rafael EspĂndola
rafael.espindola at gmail.com
Mon Sep 27 12:18:00 PDT 2010
> Sorry about it. I understood that you preferred to have both ARM and
> X86 consistent. I will write a patch changing both.
I think I found why X86 does it the way it does. The problem is that
X86TargetMachine contains and constructs the ELFWriterInfo with
ELFWriterInfo(*this)
This eventually gets to TargetELFWriterInfo::TargetELFWriterInfo that does
is64Bit = TM.getTargetData()->getPointerSizeInBits() == 64;
Unfortunately at this point the TargetMachine is still being
constructed, so this calls the getTargetData in TargetMachine.h that
just returns 0.
An easy way to refactor this is to have a is64Bit method instead of a
field, but I am not sure about the runtime cost of it. Any other idea?
> Cheers,
> Rafael
>
Cheers,
Rafael
More information about the llvm-commits
mailing list