diff --git a/llvm/include/llvm/Transforms/Utils/VNCoercion.h b/llvm/include/llvm/Transforms/Utils/VNCoercion.h index f67b9ed0afddd..35595e7d560c7 100644 --- a/llvm/include/llvm/Transforms/Utils/VNCoercion.h +++ b/llvm/include/llvm/Transforms/Utils/VNCoercion.h @@ -20,14 +20,15 @@ #ifndef LLVM_TRANSFORMS_UTILS_VNCOERCION_H #define LLVM_TRANSFORMS_UTILS_VNCOERCION_H -#include "llvm/IR/IRBuilder.h" namespace llvm { +class Constant; class Function; class StoreInst; class LoadInst; class MemIntrinsic; class Instruction; +class IRBuilderBase; class Value; class Type; class DataLayout; @@ -44,7 +45,7 @@ bool canCoerceMustAliasedValueToLoad(Value *StoredVal, Type *LoadTy, /// /// If we can't do it, return null. Value *coerceAvailableValueToLoadType(Value *StoredVal, Type *LoadedTy, - IRBuilder<> &IRB, const DataLayout &DL); + IRBuilderBase &IRB, const DataLayout &DL); /// This function determines whether a value for the pointer LoadPtr can be /// extracted from the store at DepSI. diff --git a/llvm/lib/Transforms/Utils/VNCoercion.cpp b/llvm/lib/Transforms/Utils/VNCoercion.cpp index 717b2214b3df7..53f8e30688067 100644 --- a/llvm/lib/Transforms/Utils/VNCoercion.cpp +++ b/llvm/lib/Transforms/Utils/VNCoercion.cpp @@ -144,7 +144,8 @@ static T *coerceAvailableValueToLoadTypeHelper(T *StoredVal, Type *LoadedTy, /// /// If we can't do it, return null. Value *coerceAvailableValueToLoadType(Value *StoredVal, Type *LoadedTy, - IRBuilder<> &IRB, const DataLayout &DL) { + IRBuilderBase &IRB, + const DataLayout &DL) { return coerceAvailableValueToLoadTypeHelper(StoredVal, LoadedTy, IRB, DL); }