diff --git a/include/llvm/Support/NoFolder.h b/include/llvm/Support/NoFolder.h index 1f671c19250..7f2f1497f39 100644 --- a/include/llvm/Support/NoFolder.h +++ b/include/llvm/Support/NoFolder.h @@ -174,7 +174,7 @@ public: } Value *CreateExtractElement(Constant *Vec, Constant *Idx) const { - return new ExtractElementInst(Vec, Idx); + return ExtractElementInst::Create(Vec, Idx); } Value *CreateInsertElement(Constant *Vec, Constant *NewElt,