summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/IR/IRBuilderTest.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Replace OwningPtr<T> with std::unique_ptr<T>.Ahmed Charles2014-03-061-3/+2
| | | | | | | | | | This compiles with no changes to clang/lld/lldb with MSVC and includes overloads to various functions which are used by those projects and llvm which have OwningPtr's as parameters. This should allow out of tree projects some time to move. There are also no changes to libs/Target, which should help out of tree targets have time to move, if necessary. llvm-svn: 203083
* [Modules] Move the NoFolder into the IR library as it createsChandler Carruth2014-03-041-1/+1
| | | | | | instructions. llvm-svn: 202834
* Fix resetting the DataLayout in a Module.Rafael Espindola2014-02-251-0/+8
| | | | | | | | | | | | | | | No tool does this currently, but as everything else in a module we should be able to change its DataLayout. Most of the fix is in DataLayout to make sure it can be reset properly. The test uses Module::setDataLayout since the fact that we mutate a DataLayout is an implementation detail. The module could hold a OwningPtr<DataLayout> and the DataLayout itself could be immutable. Thanks to Philip Reames for pushing me in the right direction. llvm-svn: 202198
* Fix a bug in IRBuilder that's been there for who knows how long. ItChandler Carruth2014-01-051-0/+51
| | | | | | | | failed to correctly propagate the NUW and NSW flags to the constant folder for two instructions. I've added a unittest to cover flag propagation for the rest of the instructions and constant expressions. llvm-svn: 198538
* Use present fast-math flags when applicable in CreateBinOpMichael Ilseman2013-12-051-0/+7
| | | | | | | | We were previously not adding fast-math flags through CreateBinOp() when it happened to be making a floating point binary operator. This patch updates it to do so similarly to directly calling CreateF*(). llvm-svn: 196438
* Give unit test its own LLVMContext so MDNodes aren't leaked even if we never ↵Benjamin Kramer2013-11-151-9/+10
| | | | | | | | call llvm_shutdown. Found by valgrind. llvm-svn: 194797
* Silencing an MSVC warning.Aaron Ballman2013-10-051-2/+2
| | | | llvm-svn: 192042
* IRBuilder: Add RAII objects to reset insertion points or fast math flags.Benjamin Kramer2013-09-301-0/+36
| | | | | | | | Inspired by the object from the SLPVectorizer. This found a minor bug in the debug loc restoration in the vectorizer where the location of a following instruction was attached instead of the location from the original instruction. llvm-svn: 191673
* IRTests/IRBuilderTest.cpp: GetIntTy: Delete DL at yourself since it is not ↵NAKAMURA Takumi2013-01-231-0/+1
| | | | | | linked. llvm-svn: 173238
* IRTests/IRBuilderTest.cpp: Let GV added to the module.NAKAMURA Takumi2013-01-231-2/+2
| | | | | | It fixes --vg-leak. llvm-svn: 173237
* Rename the VMCore unittest tree to IR. Somehow was missed when doing theChandler Carruth2013-01-071-0/+184
library rename. llvm-svn: 171747
OpenPOWER on IntegriCloud