[llvm] 5e6f167 - Include SmallVector.h in IPO.h to fix modules build [NFC]

Raphael Isemann via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 30 07:41:25 PDT 2020


Author: Raphael Isemann
Date: 2020-04-30T16:33:55+02:00
New Revision: 5e6f167aa979cd274f0de413f3adb8319cca273f

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

LOG: Include SmallVector.h in IPO.h to fix modules build [NFC]

This file currently doesn't compile under LLVM_ENABLE_MODULES as SmallVector
is used in this header but is never forward declared or included in any way.
Let's include SmallVector.h instead and get rid of the SmallVectorImpl fwd
declaration which is now no longer necessary.

Added: 
    

Modified: 
    llvm/include/llvm/Transforms/IPO.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/Transforms/IPO.h b/llvm/include/llvm/Transforms/IPO.h
index 3a2edc1ff9ce..28e454d3b0fc 100644
--- a/llvm/include/llvm/Transforms/IPO.h
+++ b/llvm/include/llvm/Transforms/IPO.h
@@ -14,6 +14,7 @@
 #ifndef LLVM_TRANSFORMS_IPO_H
 #define LLVM_TRANSFORMS_IPO_H
 
+#include "llvm/ADT/SmallVector.h"
 #include <functional>
 #include <vector>
 
@@ -27,7 +28,6 @@ class Pass;
 class BasicBlock;
 class GlobalValue;
 class raw_ostream;
-template <typename T> class SmallVectorImpl;
 
 //===----------------------------------------------------------------------===//
 //


        


More information about the llvm-commits mailing list