ftmemsim-valgrind/memcheck/tests/inltemplate.cpp
Philippe Waroquiers a2ea737046 Find the name of the inlined function through a DW_AT_specification
The name is not necessarily found in the abstract origin, it can be
in a referred to specification.

If both a name and a DW_AT_specification is found in the abstract origin,
the name will have priority over the name of the specification.
(unclear if that can happen)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14076
2014-06-21 12:41:48 +00:00

31 lines
512 B
C++

#include <stdio.h>
#include <valgrind.h>
#define INLINE inline __attribute__((always_inline))
class X
{
public:
template <typename T>
static INLINE T temp_member_func_b(T argb) {
static T locb = 0;
if (argb > 0)
locb += argb;
return locb;
}
template <typename T>
static /*INLINE*/ T temp_member_func_noinline(T arga) {
return temp_member_func_b(arga);
}
};
int main() {
int result;
result = X::temp_member_func_noinline(result);
return 0;
}