@@ -24,18 +24,10 @@ static thread_local detail::code_location GCodeLocTLS = {};
2424// / check and see if code location object is available. If not, continue with
2525// / instrumentation as needed
2626tls_code_loc_t::tls_code_loc_t ()
27- #ifdef __INTEL_PREVIEW_BREAKING_CHANGES
2827 : CodeLocTLSRef(GCodeLocTLS),
2928 // Check TLS to see if a previously stashed code_location object is
3029 // available; if so, we are in a local scope.
31- MLocalScope (CodeLocTLSRef.fileName() && CodeLocTLSRef.functionName())
32- #else
33- : // Check TLS to see if a previously stashed code_location object is
34- // available; if so, we are in a local scope.
35- MLocalScope (GCodeLocTLS.fileName() && GCodeLocTLS.functionName())
36- #endif // __INTEL_PREVIEW_BREAKING_CHANGES
37- {
38- }
30+ MLocalScope (CodeLocTLSRef.fileName() && CodeLocTLSRef.functionName()) {}
3931
4032ur_code_location_t codeLocationCallback (void *) {
4133 ur_code_location_t codeloc;
@@ -53,7 +45,6 @@ ur_code_location_t codeLocationCallback(void *) {
5345// / location has been stashed in the TLS at a higher level. If not, we have the
5446// / code location information that must be active for the current calling scope.
5547tls_code_loc_t ::tls_code_loc_t (const detail::code_location &CodeLoc)
56- #ifdef __INTEL_PREVIEW_BREAKING_CHANGES
5748 : CodeLocTLSRef(GCodeLocTLS),
5849 // Check TLS to see if a previously stashed code_location object is
5950 // available; if so, then don't overwrite the previous information as we
@@ -62,36 +53,17 @@ tls_code_loc_t::tls_code_loc_t(const detail::code_location &CodeLoc)
6253 if (!MLocalScope)
6354 // Update the TLS information with the code_location information
6455 CodeLocTLSRef = CodeLoc;
65- #else
66- : // Check TLS to see if a previously stashed code_location object is
67- // available; if so, then don't overwrite the previous information as we
68- // are still in scope of the instrumented function.
69- MLocalScope (GCodeLocTLS.fileName () && GCodeLocTLS.functionName ()) {
70- if (!MLocalScope)
71- // Update the TLS information with the code_location information
72- GCodeLocTLS = CodeLoc;
73- #endif // __INTEL_PREVIEW_BREAKING_CHANGES
7456}
7557
7658// / @brief If we are the top lovel scope, reset the code location info
7759tls_code_loc_t ::~tls_code_loc_t () {
7860 // Only reset the TLS data if the top level function is going out of scope
7961 if (!MLocalScope) {
80- #ifdef __INTEL_PREVIEW_BREAKING_CHANGES
8162 CodeLocTLSRef = {};
82- #else
83- GCodeLocTLS = {};
84- #endif // __INTEL_PREVIEW_BREAKING_CHANGES
8563 }
8664}
8765
88- const detail::code_location &tls_code_loc_t::query () {
89- #ifdef __INTEL_PREVIEW_BREAKING_CHANGES
90- return CodeLocTLSRef;
91- #else
92- return GCodeLocTLS;
93- #endif // __INTEL_PREVIEW_BREAKING_CHANGES
94- }
66+ const detail::code_location &tls_code_loc_t ::query() { return CodeLocTLSRef; }
9567
9668} // namespace detail
9769} // namespace _V1
0 commit comments