81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
|
auto bb = cfg->currentBB();
if( !bb )
return PoisonValue();
// To infer the type and obtain a suitable initialization function,
// we want the declaration to behave as if it were the following function call:
// Params: ( $T, _ ( LocalVar[$T], initValType ) initFunc )
// Args: ( pat, InitializeLocalVar )
//
// Where pat is the TNamedDecl's type pattern and initVal is the initialization
// expression's type.
// We construct the above expressions and unify them. The best solution (if any)
// will give us the wanted type and the function to invoke to initialize it.
// Create the _ texpr.
static auto anyTVar = ValueToIRExpr( ToValue( TVar( "_"_sid ) ) );
|
|
|
|
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
|
auto bb = cfg->currentBB();
if( !bb )
return PoisonValue();
// To infer the type and obtain a suitable initialization function,
// we want the declaration to behave as if it were the following function call:
// Params: ( $T, _ ( LocalVar[$T], initValType ) initFunc )
// Args: ( pat, InitializeLocalVar )
//
// Where pat is the TNamedDecl's type pattern and initValType is the initialization
// expression's type.
// We construct the above expressions and unify them. The best solution (if any)
// will give us the wanted type and the function to invoke to initialize it.
// Create the _ texpr.
static auto anyTVar = ValueToIRExpr( ToValue( TVar( "_"_sid ) ) );
|