Hi all,
Well after trying numerous different approaches to find the
FUNCTION_DECL node for a constructor like MyClass::MyClass(int) from a
FUNCTION_DECL node for one of the constructors: MyClass::__comp_ctor
(int) or similar, I have found that there is a VERY simple way to do
this using DECL_
I have been looking at the source in
class.c:
clone_function_decl()
clone_constructors_and_destructors()
pt.c:
check_explicit_specialization()
In pt.c: check_explicit_specialization() it specifically requests that
the clone function of a specialised constructor NOT add the new clone t
For the code shown below, if i get the type node for the class:
"MyClassT" and then call TYPE_METHODS() on it and iterate over the
nodes, there is no FUNCTION_DECL node for the function:
MyClassT::MyClassT<::int, ::char const*>(::char const*)
From what I understand from the documentation, sinc
In order to help, I am posting the code I use to try and get a "user
constructor" FUNCTION_DECL node from a "__comp_ctor ()" FUNCTION_DECL
node as mentioned in previous emails. The code can be found at the end
of this email.
Also...
class MyClass
{
MyClass()
{}
};
int main()
{
MyCl
Andrew Pinski wrote:
Why do you need to find (2)? It is not the function which is actually
called. DECL_SAVED_TREE might not be set but that is because it has
already been gimplified and lowered to CFG at the time you are looking
through the calls.
Why do you need to know the constructor anyw
On Tue, 2006-10-24 at 03:32 +, Brendon Costa wrote:
> Sorry that my previous email was unclear. I have tried to clarify what i
> meant in this email by answering your questions.
>
>
> If there is a simple class like:
>
> class MyClass
> {
> MyClass()
> {}
> };
>
> int main()
> {
>
Sorry that my previous email was unclear. I have tried to clarify what i
meant in this email by answering your questions.
Andrew Pinski wrote:
On Tue, 2006-10-24 at 02:30 +, Brendon Costa wrote:
I am trying to find the corresponding constructor from the basic_string
class that should
On Tue, 2006-10-24 at 02:30 +, Brendon Costa wrote:
> I am trying to find the corresponding constructor from the basic_string
> class that should be called in place of the __comp_ctor function. There
> seems to be no FUNCTION_DECL node for the constructor:
>
> basic_string(::char const*, ::
Hi again,
I am having issues with the __comp_ctor () __base_ctor () etc functions
that I encounter in the C++ front-end tree (Just before gimplification).
If i compile some code that looks like:
#include
int main()
{
std::allocator alloc;
const char* str1 = "Hello";
const char* str2 =