[llvm] r174913 - [Support][Compiler] Add LLVM_HAS_VARIADIC_TEMPLATES.

Michael J. Spencer bigcheesegs at gmail.com
Mon Feb 11 14:51:07 PST 2013


Author: mspencer
Date: Mon Feb 11 16:51:07 2013
New Revision: 174913

URL: http://llvm.org/viewvc/llvm-project?rev=174913&view=rev
Log:
[Support][Compiler] Add LLVM_HAS_VARIADIC_TEMPLATES.

Modified:
    llvm/trunk/include/llvm/Support/Compiler.h

Modified: llvm/trunk/include/llvm/Support/Compiler.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/Compiler.h?rev=174913&r1=174912&r2=174913&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/Compiler.h (original)
+++ llvm/trunk/include/llvm/Support/Compiler.h Mon Feb 11 16:51:07 2013
@@ -71,6 +71,16 @@
 #define LLVM_HAS_CXX11_STDLIB 0
 #endif
 
+/// \macro LLVM_HAS_VARIADIC_TEMPLATES
+/// \brief Does this compiler support variadic templates.
+///
+/// Implies LLVM_HAS_RVALUE_REFERENCES and the existence of std::forward.
+#if __has_feature(cxx_variadic_templates)
+# define LLVM_HAS_VARIADIC_TEMPLATES 1
+#else
+# define LLVM_HAS_VARIADIC_TEMPLATES 0
+#endif
+
 /// llvm_move - Expands to ::std::move if the compiler supports
 /// r-value references; otherwise, expands to the argument.
 #if LLVM_HAS_RVALUE_REFERENCES





More information about the llvm-commits mailing list