[llvm] fa7145d - Add missing includes after LLVMCore header cleanup

via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 1 22:51:20 PST 2022


Author: serge-sans-paille
Date: 2022-02-02T07:51:13+01:00
New Revision: fa7145dfbf94cb93b1c3e610582c495cb806569b

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

LOG: Add missing includes after LLVMCore header cleanup

- conditionally include header only used for expensive check
- have Core.h always include llvm-c/ErrorHandling.h

Added: 
    

Modified: 
    llvm/include/llvm-c/Core.h
    llvm/lib/IR/LegacyPassManager.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm-c/Core.h b/llvm/include/llvm-c/Core.h
index dcee8cf1133c9..09d80841fa5d3 100644
--- a/llvm/include/llvm-c/Core.h
+++ b/llvm/include/llvm-c/Core.h
@@ -16,7 +16,9 @@
 #define LLVM_C_CORE_H
 
 #include "llvm-c/Deprecated.h"
+#include "llvm-c/ErrorHandling.h"
 #include "llvm-c/ExternC.h"
+
 #include "llvm-c/Types.h"
 
 LLVM_C_EXTERN_C_BEGIN

diff  --git a/llvm/lib/IR/LegacyPassManager.cpp b/llvm/lib/IR/LegacyPassManager.cpp
index 27c8979edb344..08cf909a83f92 100644
--- a/llvm/lib/IR/LegacyPassManager.cpp
+++ b/llvm/lib/IR/LegacyPassManager.cpp
@@ -28,6 +28,11 @@
 #include "llvm/Support/Timer.h"
 #include "llvm/Support/raw_ostream.h"
 #include <algorithm>
+
+#ifdef EXPENSIVE_CHECKS
+#include "llvm/IR/StructuralHash.h"
+#endif
+
 using namespace llvm;
 
 // See PassManagers.h for Pass Manager infrastructure overview.


        


More information about the llvm-commits mailing list