Index: base/debug/alias.cc |
=================================================================== |
--- base/debug/alias.cc (revision 0) |
+++ base/debug/alias.cc (revision 0) |
@@ -0,0 +1,25 @@ |
+// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include "base/debug/alias.h" |
+#include "build/build_config.h" |
+ |
+namespace base { |
+namespace debug { |
+ |
+// Prevent MSVC link time code generation from inlining this function. This |
+// could render the referenced variable unaliased. |
+#if defined(COMPILER_MSVC) |
+__declspec(naked) |
+#endif |
+void Alias(void** var) { |
+#if defined(COMPILER_MSVC) |
+ __asm { |
+ ret |
+ } |
+#endif |
+} |
+ |
+} // namespace debug |
+} // namespace base |
Property changes on: base\debug\alias.cc |
___________________________________________________________________ |
Added: svn:eol-style |
+ LF |