[llvm] r261827 - [Support] Don't check for ICC directly and rely on the __GNUC__ check

Chandler Carruth via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 24 22:13:01 PST 2016

Author: chandlerc
Date: Thu Feb 25 00:13:01 2016
New Revision: 261827

URL: http://llvm.org/viewvc/llvm-project?rev=261827&view=rev
[Support] Don't check for ICC directly and rely on the __GNUC__ check
(which they emulate). This way we don't use that path when compiled with
ICC on Windows where it mimics MSVC's behavior and supports __FUNCSIG__.

Thanks for David Majnemer again for spotting this better pattern!


Modified: llvm/trunk/include/llvm/Support/TypeName.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/TypeName.h?rev=261827&r1=261826&r2=261827&view=diff
--- llvm/trunk/include/llvm/Support/TypeName.h (original)
+++ llvm/trunk/include/llvm/Support/TypeName.h Thu Feb 25 00:13:01 2016
@@ -26,7 +26,7 @@ namespace llvm {
 /// inner substring of a larger string.
 template <typename DesiredTypeName>
 inline StringRef getTypeName() {
-#if defined(__clang__) || defined(__GNUC__) || defined(__INTEL_COMPILER)
+#if defined(__clang__) || defined(__GNUC__)
   StringRef Name = __PRETTY_FUNCTION__;
   StringRef Key = "DesiredTypeName = ";

More information about the llvm-commits mailing list