[llvm] c106e8d - [Support] Remove unneeded __has_include fallback

via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 20 08:49:19 PDT 2024


Author: Fangrui Song
Date: 2024-08-20T08:49:15-07:00
New Revision: c106e8d729d121bb70739d9703be8b8cd416916f

URL: https://github.com/llvm/llvm-project/commit/c106e8d729d121bb70739d9703be8b8cd416916f
DIFF: https://github.com/llvm/llvm-project/commit/c106e8d729d121bb70739d9703be8b8cd416916f.diff

LOG: [Support] Remove unneeded __has_include fallback

This is a C++17 feature implemented in all supported compilers.

Pull Request: https://github.com/llvm/llvm-project/pull/104898

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/Support/Compiler.h b/llvm/include/llvm/Support/Compiler.h
index d8e3794babc744..9d8607f8dd9aca 100644
--- a/llvm/include/llvm/Support/Compiler.h
+++ b/llvm/include/llvm/Support/Compiler.h
@@ -39,10 +39,6 @@
 # define __has_builtin(x) 0
 #endif
 
-#ifndef __has_include
-# define __has_include(x) 0
-#endif
-
 // Only use __has_cpp_attribute in C++ mode. GCC defines __has_cpp_attribute in
 // C mode, but the :: in __has_cpp_attribute(scoped::attribute) is invalid.
 #ifndef LLVM_HAS_CPP_ATTRIBUTE


        


More information about the llvm-commits mailing list