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

Unified Diff: third_party/crashpad/crashpad/snapshot/mac/process_types/traits.h

Issue 1505213004: Copy Crashpad into the Chrome tree instead of importing it via DEPS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review comments, update README.chromium Created 5 years 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
Index: third_party/crashpad/crashpad/snapshot/mac/process_types/traits.h
diff --git a/third_party/crashpad/crashpad/snapshot/mac/process_types/traits.h b/third_party/crashpad/crashpad/snapshot/mac/process_types/traits.h
new file mode 100644
index 0000000000000000000000000000000000000000..0b4d2731a195c55220ecff8dcb91b72cc4e968f7
--- /dev/null
+++ b/third_party/crashpad/crashpad/snapshot/mac/process_types/traits.h
@@ -0,0 +1,42 @@
+// Copyright 2014 The Crashpad Authors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// This file is intended to be included multiple times in the same translation
+// unit, so #include guards are intentionally absent.
+//
+// This file is included by snapshot/mac/process_types.h and
+// snapshot/mac/process_types/internal.h to produce traits class definitions.
+
+// Things that #include this file should #undef
+// DECLARE_PROCESS_TYPE_TRAITS_CLASS before #including this file again and after
+// the last #include of this file.
+//
+// |Reserved| is used for padding fields that may be zero-length, and thus
+// __VA_ARGS__, which is intended to set the alignment of the 64-bit types, is
+// not used for that type alias.
+#define DECLARE_PROCESS_TYPE_TRAITS_CLASS(traits_name, lp_bits, ...) \
+ namespace crashpad { \
+ namespace process_types { \
+ namespace internal { \
+ struct Traits##traits_name { \
+ using Long = int##lp_bits##_t __VA_ARGS__; \
+ using ULong = uint##lp_bits##_t __VA_ARGS__; \
+ using Pointer = uint##lp_bits##_t __VA_ARGS__; \
+ using IntPtr = int##lp_bits##_t __VA_ARGS__; \
+ using UIntPtr = uint##lp_bits##_t __VA_ARGS__; \
+ using Reserved64Only = Reserved64Only##lp_bits; \
+ }; \
+ } \
+ } \
+ }

Powered by Google App Engine
This is Rietveld 408576698