[cfe-dev] Clang compile error

pdrocaldeira pdrocaldeira at gmail.com
Thu Mar 26 14:12:45 PDT 2015


Sorry for double posting but if you wanna make a pass. You should build it
on top of src folder. I don't know why but that's how it worked for me in
the end. And use svn. Don't download from website. It doesn't work.

2015-03-26 18:10 GMT-03:00 Pedro Caldeira <pdrocaldeira at gmail.com>:

> Compile it outside the src folder as Chilledheart told me. It works ;)
>
> 2015-03-26 17:54 GMT-03:00 schivei [via Clang Developers] <
> ml-node+s42468n4044698h33 at n3.nabble.com>:
>
> I had the same problem! :(
>>
>> Distributor ID: Ubuntu
>> Description:    Ubuntu 14.04.1 LTS
>> Release:        14.04
>> Codename:       trusty
>>
>> LLVM: 3.6 (Downloaded today)
>>
>> g++ (Ubuntu 4.8.2-19ubuntu1) 4.8.2
>> Copyright (C) 2013 Free Software Foundation, Inc.
>> This is free software; see the source for copying conditions.  There is
>> NO
>> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
>> PURPOSE.
>>
>> Error:
>>
>> g++ -o parser `llvm-config --libs core jit native --cxxflags --ldflags` *.cpp -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS
>> codegen.cpp: In member function ‘void CodeGenContext::generateCode(NBlock&)’:
>> codegen.cpp:14:94: error: no matching function for call to ‘llvm::FunctionType::get(llvm::Type*, std::vector<const llvm::Type*>&, bool)’
>>   FunctionType *ftype = FunctionType::get(Type::getVoidTy(getGlobalContext()), argTypes, false);
>>                                                                                               ^
>> codegen.cpp:14:94: note: candidates are:
>> In file included from /usr/lib/llvm-3.4/include/llvm/IR/GlobalValue.h:22:0,
>>                  from /usr/lib/llvm-3.4/include/llvm/IR/Function.h:25,
>>                  from /usr/lib/llvm-3.4/include/llvm/IR/Module.h:19,
>>                  from node.h:2,
>>                  from codegen.cpp:1:
>> /usr/lib/llvm-3.4/include/llvm/IR/DerivedTypes.h:105:24: note: static llvm::FunctionType* llvm::FunctionType::get(llvm::Type*, llvm::ArrayRef<llvm::Type*>, bool)
>>    static FunctionType *get(Type *Result,
>>                         ^
>> /usr/lib/llvm-3.4/include/llvm/IR/DerivedTypes.h:105:24: note:   no known conversion for argument 2 from ‘std::vector<const llvm::Type*>’ to ‘llvm::ArrayRef<llvm::Type*>’
>> /usr/lib/llvm-3.4/include/llvm/IR/DerivedTypes.h:110:24: note: static llvm::FunctionType* llvm::FunctionType::get(llvm::Type*, bool)
>>    static FunctionType *get(Type *Result, bool isVarArg);
>>                         ^
>> /usr/lib/llvm-3.4/include/llvm/IR/DerivedTypes.h:110:24: note:   candidate expects 2 arguments, 3 provided
>> codegen.cpp:28:2: error: ‘PassManager’ was not declared in this scope
>>   PassManager pm;
>>   ^
>> codegen.cpp:28:14: error: expected ‘;’ before ‘pm’
>>   PassManager pm;
>>               ^
>> codegen.cpp:29:2: error: ‘pm’ was not declared in this scope
>>   pm.add(createPrintModulePass(&outs()));
>>
>>
>>
>> ------------------------------
>>  If you reply to this email, your message will be added to the
>> discussion below:
>>
>> http://clang-developers.42468.n3.nabble.com/Clang-compile-error-tp4044509p4044698.html
>>  To unsubscribe from Clang compile error, click here
>> <http://clang-developers.42468.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4044509&code=cGRyb2NhbGRlaXJhQGdtYWlsLmNvbXw0MDQ0NTA5fC00ODEzMDk5MQ==>
>> .
>> NAML
>> <http://clang-developers.42468.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
>
>




--
View this message in context: http://clang-developers.42468.n3.nabble.com/Clang-compile-error-tp4044509p4044700.html
Sent from the Clang Developers mailing list archive at Nabble.com.




More information about the cfe-dev mailing list