[LLVMdev] struct and class under VC7.1
Paolo Invernizzi
arathorn at fastwebnet.it
Thu Sep 23 07:37:28 PDT 2004
On Sep 23, 2004, at 4:08 PM, Jeff Cohen wrote:
> MSVC++ is picky about this. It considers classes and structs to be
> different types so you have to be consistent. If you forward declared
> a
> struct as a class within the same compilation unit, it would complain
> about that too. It's not just linking.
You are right...
BTW, I've just fixed that problem in my checkout and, among others
terrible hacks, here I am:
:\home\arathorn\sandbox\llvm>HowToUseJIT.exe
We just constructed this LLVM module:
implementation ; Functions:
int %add1(int %AnArg) {
EntryBlock:
%addresult = add int 1, %AnArg ; <int> [#uses=1]
ret int %addresult
}
int %foo() {
EntryBlock:
%add1 = call int %add1( int 10 ) ; <int>
[#uses=1]
ret int %add1
}
Running foo: Result: 11
D:\home\arathorn\sandbox\llvm>
Yabba! Yabba! Yabba! ;-)
---
Paolo Invernizzi
More information about the llvm-dev
mailing list