summaryrefslogtreecommitdiffstats
path: root/mojo/public/c/system/macros.h
diff options
context:
space:
mode:
authorblundell <blundell@chromium.org>2015-01-19 09:18:33 -0800
committerCommit bot <commit-bot@chromium.org>2015-01-19 17:19:27 +0000
commit70fb54767b472a5edfb859e489beeeec7abdb0e4 (patch)
tree28e534ec774391a9f6571a1770e12a0d63ebf833 /mojo/public/c/system/macros.h
parentba5f0233fa38f949e24f6274ba891fa652eab640 (diff)
downloadchromium_src-70fb54767b472a5edfb859e489beeeec7abdb0e4.zip
chromium_src-70fb54767b472a5edfb859e489beeeec7abdb0e4.tar.gz
chromium_src-70fb54767b472a5edfb859e489beeeec7abdb0e4.tar.bz2
Move //mojo/{public, edk} underneath //third_party
This CL move //mojo/public and //mojo/edk to live in the following locations: - //third_party/mojo/src/mojo/public - //third_party/mojo/src/mojo/edk It moves the related gypfiles from //mojo to //third_party/mojo and updates them as necessary to account for the file moves. It also updates clients of the mojo SDK and EDK targets in both GYP and GN. (Note that for GN, the mojo SDK and EDK build systems are maintained in the Mojo repo and designed to be flexible wrt the location of the SDK/EDK in a client repo, so no changes are needed. This CL does not update include paths to the code being moved to limit the number of moving parts, instead relying on the include_dirs that the SDK and EDK targets supply to their direct dependents to ensure that include paths continue to resolve correctly. NOPRESUBMIT=true Review URL: https://codereview.chromium.org/814543006 Cr-Commit-Position: refs/heads/master@{#312129}
Diffstat (limited to 'mojo/public/c/system/macros.h')
-rw-r--r--mojo/public/c/system/macros.h79
1 files changed, 0 insertions, 79 deletions
diff --git a/mojo/public/c/system/macros.h b/mojo/public/c/system/macros.h
deleted file mode 100644
index 7f28e18..0000000
--- a/mojo/public/c/system/macros.h
+++ /dev/null
@@ -1,79 +0,0 @@
-// Copyright 2014 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.
-
-#ifndef MOJO_PUBLIC_C_SYSTEM_MACROS_H_
-#define MOJO_PUBLIC_C_SYSTEM_MACROS_H_
-
-#include <stddef.h>
-
-// Annotate a variable indicating it's okay if it's unused.
-// Use like:
-// int x = ...;
-// MOJO_ALLOW_UNUSED_LOCAL(x);
-#define MOJO_ALLOW_UNUSED_LOCAL(x) false ? (void)x : (void)0
-
-// Annotate a function indicating that the caller must examine the return value.
-// Use like:
-// int foo() MOJO_WARN_UNUSED_RESULT;
-// Note that it can only be used on the prototype, and not the definition.
-#if defined(__GNUC__)
-#define MOJO_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
-#else
-#define MOJO_WARN_UNUSED_RESULT
-#endif
-
-#ifdef __cplusplus
-// Used to explicitly mark the return value of a function as unused. If you are
-// really sure you don't want to do anything with the return value of a function
-// that has been marked WARN_UNUSED_RESULT, wrap it with this. Example:
-//
-// scoped_ptr<MyType> my_var = ...;
-// if (TakeOwnership(my_var.get()) == SUCCESS)
-// mojo_ignore_result(my_var.release());
-//
-template <typename T>
-inline void mojo_ignore_result(const T&) {
-}
-#endif
-
-// Assert things at compile time. (|msg| should be a valid identifier name.)
-// This macro is currently C++-only, but we want to use it in the C core.h.
-// Use like:
-// MOJO_STATIC_ASSERT(sizeof(Foo) == 12, "Foo has invalid size");
-#if defined(__cplusplus)
-#define MOJO_STATIC_ASSERT(expr, msg) static_assert(expr, msg)
-#else
-#define MOJO_STATIC_ASSERT(expr, msg)
-#endif
-
-// Like the C++11 |alignof| operator.
-#if __cplusplus >= 201103L
-#define MOJO_ALIGNOF(type) alignof(type)
-#elif defined(__GNUC__)
-#define MOJO_ALIGNOF(type) __alignof__(type)
-#elif defined(_MSC_VER)
-// The use of |sizeof| is to work around a bug in MSVC 2010 (see
-// http://goo.gl/isH0C; supposedly fixed since then).
-#define MOJO_ALIGNOF(type) (sizeof(type) - sizeof(type) + __alignof(type))
-#else
-#error "Please define MOJO_ALIGNOF() for your compiler."
-#endif
-
-// Specify the alignment of a |struct|, etc.
-// Use like:
-// struct MOJO_ALIGNAS(8) Foo { ... };
-// Unlike the C++11 |alignas()|, |alignment| must be an integer. It may not be a
-// type, nor can it be an expression like |MOJO_ALIGNOF(type)| (due to the
-// non-C++11 MSVS version).
-#if __cplusplus >= 201103L
-#define MOJO_ALIGNAS(alignment) alignas(alignment)
-#elif defined(__GNUC__)
-#define MOJO_ALIGNAS(alignment) __attribute__((aligned(alignment)))
-#elif defined(_MSC_VER)
-#define MOJO_ALIGNAS(alignment) __declspec(align(alignment))
-#else
-#error "Please define MOJO_ALIGNAS() for your compiler."
-#endif
-
-#endif // MOJO_PUBLIC_C_SYSTEM_MACROS_H_