alias.h 598 Bytes
Newer Older
gejun's avatar
gejun committed
1 2 3 4
// 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.

5 6
#ifndef BUTIL_DEBUG_ALIAS_H_
#define BUTIL_DEBUG_ALIAS_H_
gejun's avatar
gejun committed
7

8
#include "butil/base_export.h"
gejun's avatar
gejun committed
9

10
namespace butil {
gejun's avatar
gejun committed
11 12 13 14 15
namespace debug {

// Make the optimizer think that var is aliased. This is to prevent it from
// optimizing out variables that that would not otherwise be live at the point
// of a potential crash.
16
void BUTIL_EXPORT Alias(const void* var);
gejun's avatar
gejun committed
17 18

}  // namespace debug
19
}  // namespace butil
gejun's avatar
gejun committed
20

21
#endif  // BUTIL_DEBUG_ALIAS_H_