Thanks David-
Running clang -v gets me the following. I did check out the trunk,
following the directions on the Etoile website.
ryan@localhost ~/Etoile $ clang -v
clang version 3.0 (trunk 135766)
Target: x86_64-unknown-linux-gnu
Thread model: posix
When I change the line in NSObject+Trait.m to move the @synthesize above the
load method the class compiles properly, but then I get a ton of errors in
LanguageKit. I can't imagine there are this many errors in the trunk so I
must be doing something wrong.
Making all for framework LanguageKitCodeGen...
Creating obj/LanguageKitCodeGen.obj/AMD64/...
Compiling file CGObjCGNU.cpp ...
In file included from CGObjCGNU.cpp:23:
/home/ryan/Etoile/Languages/LanguageKit/CodeGen/LLVMCompat.h:21:12: error:
no matching function for call to 'Create'
return llvm::PHINode::Create(Ty, NumReservedValues, NameStr,
InsertBefore);
^~~~~~~~~~~~~~~~~~~~~
/home/ryan/llvm/include/llvm/Instructions.h:1653:19: note: candidate
function not viable: 1st argument
('const llvm::Type *') would lose const qualifier
static PHINode *Create(Type *Ty, unsigned NumReservedValues,
^
/home/ryan/llvm/include/llvm/Instructions.h:1658:19: note: candidate
function not viable: 1st argument
('const llvm::Type *') would lose const qualifier
static PHINode *Create(Type *Ty, unsigned NumReservedValues,
^
In file included from CGObjCGNU.cpp:23:
/home/ryan/Etoile/Languages/LanguageKit/CodeGen/LLVMCompat.h:36:28: error:
cannot initialize a parameter of type
'llvm::Type *' with an lvalue of type 'const llvm::Type *'
return Builder->CreatePHI(Ty, NumReservedValues, NameStr);
^~
/home/ryan/llvm/include/llvm/Support/IRBuilder.h:1104:28: note: passing
argument to parameter 'Ty' here
PHINode *CreatePHI(Type *Ty, unsigned NumReservedValues,
^
CGObjCGNU.cpp:247:16: error: no matching function for call to 'get'
SelStructTy = GetStructType(
^~~~~~~~~~~~~~
/home/ryan/Etoile/Languages/LanguageKit/CodeGen/LLVMCompat.h:55:37: note:
expanded from:
#define GetStructType(context, ...) StructType::get(__VA_ARGS__)
^~~~~~~~~~~~~~~
/home/ryan/llvm/include/llvm/DerivedTypes.h:211:22: note: candidate function
not viable: no known conversion from
'const llvm::Type *' to 'llvm::LLVMContext &' for 1st argument;
static StructType *get(LLVMContext &Context, ArrayRef<Type*> Elements,
^
/home/ryan/llvm/include/llvm/DerivedTypes.h:222:22: note: candidate function
not viable: 1st argument
('const llvm::Type *') would lose const qualifier
static StructType *get(Type *elt1, ...) END_WITH_NULL;
^
/home/ryan/llvm/include/llvm/DerivedTypes.h:216:22: note: candidate function
not viable: requires at most 2 arguments,
but 3 were provided
static StructType *get(LLVMContext &Context, bool isPacked = false);
^
CGObjCGNU.cpp:252:44: error: cannot initialize a parameter of type
'llvm::Type *' with an lvalue of type
'const llvm::StructType *'
SelectorTy = llvm::PointerType::getUnqual(SelStructTy);
^~~~~~~~~~~
/home/ryan/llvm/include/llvm/DerivedTypes.h:418:39: note: passing argument
to parameter 'ElementType' here
static PointerType *getUnqual(Type *ElementType) {
^
CGObjCGNU.cpp:253:44: error: cannot initialize a parameter of type
'llvm::Type *' with an lvalue of type
'const llvm::Type *'
PtrToIntTy = llvm::PointerType::getUnqual(IntTy);
^~~~~
/home/ryan/llvm/include/llvm/DerivedTypes.h:418:39: note: passing argument
to parameter 'ElementType' here
static PointerType *getUnqual(Type *ElementType) {
^
CGObjCGNU.cpp:262:10: error: no matching function for call to 'get'
IMPTy = llvm::FunctionType::get(IdTy, IMPArgs, true);
^~~~~~~~~~~~~~~~~~~~~~~
/home/ryan/llvm/include/llvm/DerivedTypes.h:105:24: note: candidate function
not viable: 1st argument
('const llvm::Type *') would lose const qualifier
static FunctionType *get(Type *Result,
^
/home/ryan/llvm/include/llvm/DerivedTypes.h:110:24: note: candidate function
not viable: requires 2 arguments, but 3
were provided
static FunctionType *get(Type *Result, bool isVarArg);
^
CGObjCGNU.cpp:272:13: error: no matching member function for call to
'getOrInsertFunction'
TheModule.getOrInsertFunction("objc_lookup_class", IdTy,
PtrToInt8Ty,
~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
/home/ryan/llvm/include/llvm/Module.h:292:13: note: candidate function not
viable: 2nd argument ('const llvm::Type *')
would lose const qualifier
Constant *getOrInsertFunction(StringRef Name, Type *RetTy, ...)
^
/home/ryan/llvm/include/llvm/Module.h:287:13: note: candidate function not
viable: no known conversion from
'const llvm::Type *' to 'llvm::AttrListPtr' for 2nd argument;
Constant *getOrInsertFunction(StringRef Name,
^
/home/ryan/llvm/include/llvm/Module.h:275:13: note: candidate function not
viable: requires 3 arguments, but 4 were
provided
Constant *getOrInsertFunction(StringRef Name, FunctionType *T,
^
/home/ryan/llvm/include/llvm/Module.h:278:13: note: candidate function not
viable: requires 2 arguments, but 4 were
provided
Constant *getOrInsertFunction(StringRef Name, FunctionType *T);
^
CGObjCGNU.cpp:295:34: error: cannot initialize a parameter of type
'llvm::Type *' with an lvalue of type
'const llvm::Type *'
llvm::PointerType::getUnqual(SelectorTy),
^~~~~~~~~~
/home/ryan/llvm/include/llvm/DerivedTypes.h:418:39: note: passing argument
to parameter 'ElementType' here
static PointerType *getUnqual(Type *ElementType) {
^
CGObjCGNU.cpp:315:33: error: cannot initialize a parameter of type
'llvm::Type *' with an lvalue of type
'const llvm::Type *'
llvm::PointerType::getUnqual(SelectorTy),
^~~~~~~~~~
/home/ryan/llvm/include/llvm/DerivedTypes.h:418:39: note: passing argument
to parameter 'ElementType' here
static PointerType *getUnqual(Type *ElementType) {
^
CGObjCGNU.cpp:332:14: error: no matching member function for call to
'getOrInsertFunction'
TheModule.getOrInsertFunction("sel_register_name",
~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
/home/ryan/llvm/include/llvm/Module.h:292:13: note: candidate function not
viable: 2nd argument ('const llvm::Type *')
would lose const qualifier
Constant *getOrInsertFunction(StringRef Name, Type *RetTy, ...)
^
/home/ryan/llvm/include/llvm/Module.h:287:13: note: candidate function not
viable: no known conversion from
'const llvm::Type *' to 'llvm::AttrListPtr' for 2nd argument;
Constant *getOrInsertFunction(StringRef Name,
^
/home/ryan/llvm/include/llvm/Module.h:275:13: note: candidate function not
viable: requires 3 arguments, but 4 were
provided
Constant *getOrInsertFunction(StringRef Name, FunctionType *T,
^
/home/ryan/llvm/include/llvm/Module.h:278:13: note: candidate function not
viable: requires 2 arguments, but 4 were
provided
Constant *getOrInsertFunction(StringRef Name, FunctionType *T);
^
CGObjCGNU.cpp:341:14: error: no matching member function for call to
'getOrInsertFunction'
TheModule.getOrInsertFunction("sel_register_typed_name",
~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
/home/ryan/llvm/include/llvm/Module.h:292:13: note: candidate function not
viable: 2nd argument ('const llvm::Type *')
would lose const qualifier
Constant *getOrInsertFunction(StringRef Name, Type *RetTy, ...)
^
/home/ryan/llvm/include/llvm/Module.h:287:13: note: candidate function not
viable: no known conversion from
'const llvm::Type *' to 'llvm::AttrListPtr' for 2nd argument;
Constant *getOrInsertFunction(StringRef Name,
^
/home/ryan/llvm/include/llvm/Module.h:275:13: note: candidate function not
viable: requires 3 arguments, but 5 were
provided
Constant *getOrInsertFunction(StringRef Name, FunctionType *T,
^
/home/ryan/llvm/include/llvm/Module.h:278:13: note: candidate function not
viable: requires 2 arguments, but 5 were
provided
Constant *getOrInsertFunction(StringRef Name, FunctionType *T);
^
CGObjCGNU.cpp:365:22: error: no matching function for call to 'get'
llvm::Constant *C = llvm::ConstantStruct::get(Ty, V);
^~~~~~~~~~~~~~~~~~~~~~~~~
/home/ryan/llvm/include/llvm/Constants.h:406:20: note: candidate function
not viable: 1st argument
('const llvm::StructType *') would lose const qualifier
static Constant *get(StructType *T, ArrayRef<Constant*> V);
^
/home/ryan/llvm/include/llvm/Constants.h:407:20: note: candidate function
not viable: 1st argument
('const llvm::StructType *') would lose const qualifier
static Constant *get(StructType *T, ...) END_WITH_NULL;
^
CGObjCGNU.cpp:366:13: error: no matching constructor for initialization of
'llvm::GlobalVariable'
return new llvm::GlobalVariable(TheModule, Ty, false,
^ ~~~~~~~~~~~~~~~~~~~~~
/home/ryan/llvm/include/llvm/GlobalVariable.h:58:3: note: candidate
constructor not viable: no known conversion from
'const llvm::StructType *' to 'llvm::Type *' for 2nd argument;
GlobalVariable(Module &M, Type *Ty, bool isConstant,
^
/home/ryan/llvm/include/llvm/GlobalVariable.h:53:3: note: candidate
constructor not viable: no known conversion from
'llvm::Module' to 'llvm::Type *' for 1st argument;
GlobalVariable(Type *Ty, bool isConstant, LinkageTypes Linkage,
^
/home/ryan/llvm/include/llvm/GlobalVariable.h:39:3: note: candidate
constructor not viable: requires 1 argument, but 6
were provided
GlobalVariable(const GlobalVariable &); // Do not implement
^
CGObjCGNU.cpp:375:22: error: no matching function for call to 'get'
llvm::Constant *C = llvm::ConstantArray::get(Ty, V);
^~~~~~~~~~~~~~~~~~~~~~~~
/home/ryan/llvm/include/llvm/Constants.h:335:20: note: candidate function
not viable: 1st argument
('const llvm::ArrayType *') would lose const qualifier
static Constant *get(ArrayType *T, ArrayRef<Constant*> V);
^
/home/ryan/llvm/include/llvm/Constants.h:343:20: note: candidate function
not viable: no known conversion from
'const llvm::ArrayType *' to 'llvm::LLVMContext &' for 1st argument;
static Constant *get(LLVMContext &Context, StringRef Initializer,
^
CGObjCGNU.cpp:376:13: error: no matching constructor for initialization of
'llvm::GlobalVariable'
return new llvm::GlobalVariable(TheModule, Ty, false,
^ ~~~~~~~~~~~~~~~~~~~~~
/home/ryan/llvm/include/llvm/GlobalVariable.h:58:3: note: candidate
constructor not viable: no known conversion from
'const llvm::ArrayType *' to 'llvm::Type *' for 2nd argument;
GlobalVariable(Module &M, Type *Ty, bool isConstant,
^
/home/ryan/llvm/include/llvm/GlobalVariable.h:53:3: note: candidate
constructor not viable: no known conversion from
'llvm::Module' to 'llvm::Type *' for 1st argument;
GlobalVariable(Type *Ty, bool isConstant, LinkageTypes Linkage,
^
/home/ryan/llvm/include/llvm/GlobalVariable.h:39:3: note: candidate
constructor not viable: requires 1 argument, but 6
were provided
GlobalVariable(const GlobalVariable &); // Do not implement
^
CGObjCGNU.cpp:403:18: error: no matching function for call to 'get'
Ivars.push_back(ConstantInt::get(IntTy, length));
^~~~~~~~~~~~~~~~
/home/ryan/llvm/include/llvm/Constants.h:65:20: note: candidate function not
viable: 1st argument ('const llvm::Type *')
would lose const qualifier
static Constant *get(Type *Ty, uint64_t V, bool isSigned = false);
^
/home/ryan/llvm/include/llvm/Constants.h:73:23: note: candidate function not
viable: no known conversion from
'const llvm::Type *' to 'llvm::IntegerType *' for 1st argument;
static ConstantInt *get(IntegerType *Ty, uint64_t V,
^
/home/ryan/llvm/include/llvm/Constants.h:86:23: note: candidate function not
viable: no known conversion from
'const llvm::Type *' to 'llvm::LLVMContext &' for 1st argument;
static ConstantInt *get(LLVMContext &Context, const APInt &V);
^
/home/ryan/llvm/include/llvm/Constants.h:95:20: note: candidate function not
viable: 1st argument ('const llvm::Type *')
would lose const qualifier
static Constant *get(Type* Ty, const APInt& V);
^
/home/ryan/llvm/include/llvm/Constants.h:90:23: note: candidate function not
viable: requires 3 arguments, but 2 were
provided
static ConstantInt *get(IntegerType *Ty, StringRef Str,
^
CGObjCGNU.cpp:405:3: error: no matching function for call to 'get'
GetStructType(Context, PtrToInt8Ty, PtrToInt8Ty, IntTy,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/ryan/Etoile/Languages/LanguageKit/CodeGen/LLVMCompat.h:55:37: note:
expanded from:
#define GetStructType(context, ...) StructType::get(__VA_ARGS__)
^~~~~~~~~~~~~~~
/home/ryan/llvm/include/llvm/DerivedTypes.h:222:22: note: candidate function
not viable: 1st argument
('const llvm::Type *') would lose const qualifier
static StructType *get(Type *elt1, ...) END_WITH_NULL;
^
/home/ryan/llvm/include/llvm/DerivedTypes.h:211:22: note: candidate function
not viable: requires at most 3 arguments,
but 4 were provided
static StructType *get(LLVMContext &Context, ArrayRef<Type*> Elements,
^
/home/ryan/llvm/include/llvm/DerivedTypes.h:216:22: note: candidate function
not viable: requires at most 2 arguments,
but 4 were provided
static StructType *get(LLVMContext &Context, bool isPacked = false);
^
CGObjCGNU.cpp:408:43: error: cannot initialize a parameter of type
'llvm::Type *' with an lvalue of type
'const llvm::Type *'
llvm::ConstantExpr::getBitCast(ObjCStr, PtrToInt8Ty));
^~~~~~~~~~~
/home/ryan/llvm/include/llvm/Constants.h:662:51: note: passing argument to
parameter 'Ty' here
static Constant *getBitCast (Constant *C, Type *Ty);
^
CGObjCGNU.cpp:427:31: error: cannot initialize a parameter of type
'llvm::Type *' with an lvalue of type
'const llvm::Type *'
sret = Builder.CreateAlloca(ReturnTy);
^~~~~~~~
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
On Fri, Jul 22, 2011 at 11:33 AM, David Chisnall <[email protected]> wrote:
> What version of clang are you using? With trunk (r134610) I don't see that
> error, and Quentin has (I think) tested with 2.9. In fact, searching the
> warnings in my copy of the clang source for the word 'after', I can't find
> that warning...
>
> David
>
> On 22 Jul 2011, at 17:27, Ryan Harter wrote:
>
> > I've got a Gentoo box with GNUstep installed and working and llvm and
> clang compiled and configured, but I'm getting errors while compiling Etoile
> which reads: property implementation declaration after method or function
> definition
> >
> > I've tried simply editing the NSObject+Trait.m file to put the
> @synthesize declaration above the load method declaration, but then I end up
> with many more errors.
> >
> > I'm thinking this might be related to libobjc versioning, does that seem
> like a reasonable conjecture? Any ideas?
> >
> > Thanks
> > Ryan
> >
> > Making all for framework EtoileFoundation...
> > Compiling file Source/NSObject+Trait.m ...
> > Source/NSObject+Trait.m:208:1: error: property implementation declaration
> after method or function definition [-Werror]
> > @synthesize trait, excludedMethodNames, aliasedMethodNames,
> skippedMethodNames, overridenMethods;
> > ^
> > Source/NSObject+Trait.m:203:1: note: method declared here
> > + (void) load
> > ^
> > Source/NSObject+Trait.m:208:1: error: property implementation declaration
> after method or function definition [-Werror]
> > @synthesize trait, excludedMethodNames, aliasedMethodNames,
> skippedMethodNames, overridenMethods;
> > ^
> > Source/NSObject+Trait.m:203:1: note: method declared here
> > + (void) load
> > ^
> > Source/NSObject+Trait.m:208:1: error: property implementation declaration
> after method or function definition [-Werror]
> > @synthesize trait, excludedMethodNames, aliasedMethodNames,
> skippedMethodNames, overridenMethods;
> > ^
> > Source/NSObject+Trait.m:203:1: note: method declared here
> > + (void) load
> > ^
> > Source/NSObject+Trait.m:208:1: error: property implementation declaration
> after method or function definition [-Werror]
> > @synthesize trait, excludedMethodNames, aliasedMethodNames,
> skippedMethodNames, overridenMethods;
> > ^
> > Source/NSObject+Trait.m:203:1: note: method declared here
> > + (void) load
> > ^
> > Source/NSObject+Trait.m:208:1: error: property implementation declaration
> after method or function definition [-Werror]
> > @synthesize trait, excludedMethodNames, aliasedMethodNames,
> skippedMethodNames, overridenMethods;
> > ^
> > Source/NSObject+Trait.m:203:1: note: method declared here
> > + (void) load
> > ^
> > 5 errors generated.
> > _______________________________________________
> > Etoile-dev mailing list
> > [email protected]
> > https://mail.gna.org/listinfo/etoile-dev
>
>
> -- Sent from my STANTEC-ZEBRA
>
>
> _______________________________________________
> Etoile-dev mailing list
> [email protected]
> https://mail.gna.org/listinfo/etoile-dev
>
_______________________________________________
Etoile-dev mailing list
[email protected]
https://mail.gna.org/listinfo/etoile-dev