Add a CreateFNeg function to IRBuilder.

llvm-svn: 73437
This commit is contained in:
Dan Gohman 2009-06-15 22:50:40 +00:00
parent 8e85118943
commit 0274d32530
1 changed files with 5 additions and 0 deletions

View File

@ -291,6 +291,11 @@ public:
return Folder.CreateNeg(VC);
return Insert(BinaryOperator::CreateNeg(V), Name);
}
Value *CreateFNeg(Value *V, const char *Name = "") {
if (Constant *VC = dyn_cast<Constant>(V))
return Folder.CreateFNeg(VC);
return Insert(BinaryOperator::CreateFNeg(V), Name);
}
Value *CreateNot(Value *V, const char *Name = "") {
if (Constant *VC = dyn_cast<Constant>(V))
return Folder.CreateNot(VC);