aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Support/IRBuilder.h
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-06-15 22:50:40 +0000
committerDan Gohman <gohman@apple.com>2009-06-15 22:50:40 +0000
commit483736a53df18fee3ebec9a1e41af3e7433bb887 (patch)
treee683aa5043ca76654ff66388aab2ed5414f07ef6 /include/llvm/Support/IRBuilder.h
parent9c8c830e37ddd809fcef30188e62a9dae7b1a41c (diff)
downloadexternal_llvm-483736a53df18fee3ebec9a1e41af3e7433bb887.zip
external_llvm-483736a53df18fee3ebec9a1e41af3e7433bb887.tar.gz
external_llvm-483736a53df18fee3ebec9a1e41af3e7433bb887.tar.bz2
Add a CreateFNeg function to IRBuilder.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73437 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support/IRBuilder.h')
-rw-r--r--include/llvm/Support/IRBuilder.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/llvm/Support/IRBuilder.h b/include/llvm/Support/IRBuilder.h
index 7942de7..3137788 100644
--- 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);