[llvm-commits] [llvm] r73437 - /llvm/trunk/include/llvm/Support/IRBuilder.h
Dan Gohman
gohman at apple.com
Mon Jun 15 15:50:40 PDT 2009
Author: djg
Date: Mon Jun 15 17:50:40 2009
New Revision: 73437
URL: http://llvm.org/viewvc/llvm-project?rev=73437&view=rev
Log:
Add a CreateFNeg function to IRBuilder.
Modified:
llvm/trunk/include/llvm/Support/IRBuilder.h
Modified: llvm/trunk/include/llvm/Support/IRBuilder.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/IRBuilder.h?rev=73437&r1=73436&r2=73437&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/IRBuilder.h (original)
+++ llvm/trunk/include/llvm/Support/IRBuilder.h Mon Jun 15 17:50:40 2009
@@ -291,6 +291,11 @@
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);
More information about the llvm-commits
mailing list