[compiler-rt] 873e8b9 - [compiler-rt][iwyu] explicitly includes `<new>` in xray_utils.cpp

Christopher Di Bella via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 5 14:47:02 PDT 2021


Author: Christopher Di Bella
Date: 2021-07-05T21:46:42Z
New Revision: 873e8b96b1226d64e4f95083147d8592ba7bd5d8

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

LOG: [compiler-rt][iwyu] explicitly includes `<new>` in xray_utils.cpp

Compiling compiler-rt with Clang modules and libc++ revealed that the
global `operator new` is being called without including `<new>`.

Differential Revision: https://reviews.llvm.org/D105401

Added: 
    

Modified: 
    compiler-rt/lib/xray/xray_utils.cpp

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/xray/xray_utils.cpp b/compiler-rt/lib/xray/xray_utils.cpp
index 4c8ad5b92be73..befbabfe45322 100644
--- a/compiler-rt/lib/xray/xray_utils.cpp
+++ b/compiler-rt/lib/xray/xray_utils.cpp
@@ -20,6 +20,7 @@
 #include <errno.h>
 #include <fcntl.h>
 #include <iterator>
+#include <new>
 #include <stdlib.h>
 #include <sys/types.h>
 #include <tuple>


        


More information about the llvm-commits mailing list