Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2157)

Unified Diff: base/debug/alias.cc

Issue 7054025: Try another way to alias a variable in optimized builds. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/debug/alias.cc
===================================================================
--- base/debug/alias.cc (revision 85991)
+++ base/debug/alias.cc (working copy)
@@ -8,13 +8,16 @@
namespace base {
namespace debug {
-namespace {
-const void* g_global;
-}
+#if defined(COMPILER_MSVC)
+#pragma optimize("", off)
+#endif
void Alias(const void* var) {
- g_global = var;
}
+#if defined(COMPILER_MSVC)
+#pragma optimize("", on)
+#endif
+
} // namespace debug
} // namespace base
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698