[llvm] 4eb909c - Cleanup header dependencies of llvm/Support/Compiler.h

via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 25 10:28:00 PST 2022


Author: serge-sans-paille
Date: 2022-01-25T19:25:42+01:00
New Revision: 4eb909c884721a0be5078c87d35d550ad31c9fb7

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

LOG: Cleanup header dependencies of llvm/Support/Compiler.h

<new> and <cstdef> were introduced in aa60b3fd875c3 but the dependency
is now dead.

As a consequence you may need to include <new> where you use it while it
was auto-included as an implicit dependency before.

The impact on the codebase is small, as <new> is a very small header
(<100 SLOC) but it gets included everywhere, so that somehow counts (?)

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 b31ba6bc7fc20..f4c277fae7cc2 100644
--- a/llvm/include/llvm/Support/Compiler.h
+++ b/llvm/include/llvm/Support/Compiler.h
@@ -17,9 +17,6 @@
 
 #include "llvm/Config/llvm-config.h"
 
-#ifdef __cplusplus
-#include <new>
-#endif
 #include <stddef.h>
 
 #if defined(_MSC_VER)


        


More information about the llvm-commits mailing list