[PATCH] D56035: Provide storage for `true_type::value` and `false_type::value`.

Dan Liew via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 11 10:03:41 PST 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rCRT350940: Provide storage for `true_type::value` and `false_type::value`. (authored by delcypher, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D56035?vs=181304&id=181305#toc

Repository:
  rCRT Compiler Runtime

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D56035/new/

https://reviews.llvm.org/D56035

Files:
  lib/sanitizer_common/CMakeLists.txt
  lib/sanitizer_common/sanitizer_type_traits.cc


Index: lib/sanitizer_common/sanitizer_type_traits.cc
===================================================================
--- lib/sanitizer_common/sanitizer_type_traits.cc
+++ lib/sanitizer_common/sanitizer_type_traits.cc
@@ -0,0 +1,21 @@
+//===-- sanitizer_type_traits.cc --------------------------------*- C++ -*-===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// Implements a subset of C++ type traits. This is so we can avoid depending
+// on system C++ headers.
+//
+//===----------------------------------------------------------------------===//
+#include "sanitizer_type_traits.h"
+
+namespace __sanitizer {
+
+const bool true_type::value;
+const bool false_type::value;
+
+}  // namespace __sanitizer
Index: lib/sanitizer_common/CMakeLists.txt
===================================================================
--- lib/sanitizer_common/CMakeLists.txt
+++ lib/sanitizer_common/CMakeLists.txt
@@ -38,6 +38,7 @@
   sanitizer_suppressions.cc
   sanitizer_tls_get_addr.cc
   sanitizer_thread_registry.cc
+  sanitizer_type_traits.cc
   sanitizer_win.cc)
 
 if(UNIX AND NOT APPLE AND NOT OS_NAME MATCHES "SunOS")


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56035.181305.patch
Type: text/x-patch
Size: 1345 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190111/19402c98/attachment.bin>


More information about the llvm-commits mailing list