projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9a8c580
)
Add a CreateFNeg function to IRBuilder.
author
Dan Gohman
<gohman@apple.com>
Mon, 15 Jun 2009 22:50:40 +0000
(22:50 +0000)
committer
Dan Gohman
<gohman@apple.com>
Mon, 15 Jun 2009 22:50:40 +0000
(22:50 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73437
91177308
-0d34-0410-b5e6-
96231b3b80d8
include/llvm/Support/IRBuilder.h
patch
|
blob
|
history
diff --git
a/include/llvm/Support/IRBuilder.h
b/include/llvm/Support/IRBuilder.h
index 7942de7857a2f5f61a52a16e32fd333e4e1c09c3..31377882e1077e1b5e74caf10cb9bed2af2663b6 100644
(file)
--- a/
include/llvm/Support/IRBuilder.h
+++ b/
include/llvm/Support/IRBuilder.h
@@
-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);