summaryrefslogtreecommitdiffstats
path: root/libcxxabi/src/demangle/Compiler.h
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2018-07-20 17:16:49 +0000
committerZachary Turner <zturner@google.com>2018-07-20 17:16:49 +0000
commit0e3fbf6b8b68614084b93c0b116acfa547a232c8 (patch)
treef44f32438bd8f9c6f0a28ddd66bcb9de76fe05fe /libcxxabi/src/demangle/Compiler.h
parent20c2962585f250d119c5b32dde344ed49af4ec7f (diff)
downloadbcm5719-llvm-0e3fbf6b8b68614084b93c0b116acfa547a232c8.tar.gz
bcm5719-llvm-0e3fbf6b8b68614084b93c0b116acfa547a232c8.zip
Merge changes to ItaniumDemangle over to libcxxabi.
ItaniumDemangle had a small NFC refactor to make some of its code reusable by the newly added Microsoft demangler. To keep the libcxxabi demangler as close as possible to the master copy this refactor is being merged over. Differential Revision: https://reviews.llvm.org/D49575 llvm-svn: 337582
Diffstat (limited to 'libcxxabi/src/demangle/Compiler.h')
-rw-r--r--libcxxabi/src/demangle/Compiler.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/libcxxabi/src/demangle/Compiler.h b/libcxxabi/src/demangle/Compiler.h
new file mode 100644
index 00000000000..e5f3c72a451
--- /dev/null
+++ b/libcxxabi/src/demangle/Compiler.h
@@ -0,0 +1,34 @@
+//===--- Compiler.h ---------------------------------------------*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+// This file is contains a subset of macros copied from
+// llvm/lib/Demangle/Compiler.h.
+//===----------------------------------------------------------------------===//
+
+#ifndef LIBCXX_DEMANGLE_COMPILER_H
+#define LIBCXX_DEMANGLE_COMPILER_H
+
+#ifdef _MSC_VER
+// snprintf is implemented in VS 2015
+#if _MSC_VER < 1900
+#define snprintf _snprintf_s
+#endif
+#endif
+
+#ifndef __has_attribute
+#define __has_attribute(x) 0
+#endif
+
+#ifndef NDEBUG
+#if __has_attribute(noinline) && __has_attribute(used)
+#define DUMP_METHOD __attribute__((noinline, used))
+#else
+#define DUMP_METHOD
+#endif
+#endif
+
+#endif
OpenPOWER on IntegriCloud