summaryrefslogtreecommitdiff
path: root/unittests
Commit message (Collapse)AuthorAge
* Go ahead and get rid of the old page size interface and convert all theChandler Carruth2012-12-31
| | | | | | | users over to the new one. No sense maintaining this "compatibility" layer it seems. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171331 91177308-0d34-0410-b5e6-96231b3b80d8
* Flesh out a page size accessor in the new API.Chandler Carruth2012-12-31
| | | | | | | | Implement the old API in terms of the new one. This simplifies the implementation on Windows which can now re-use the self_process's once initialization. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171330 91177308-0d34-0410-b5e6-96231b3b80d8
* [AlignOf] Add AlignedCharArray and refactor AlignedCharArrayUnion.Michael J. Spencer2012-12-31
| | | | | | | This adds AlignedCharArray<Alignment, Size>. A templated struct that contains a member named buffer of type char[Size] that is aligned to Alignment. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171319 91177308-0d34-0410-b5e6-96231b3b80d8
* Begin sketching out the process interface.Chandler Carruth2012-12-31
| | | | | | | | | | | | | | | | | | | | | | | The coding style used here is not LLVM's style because this is modeled after a Boost interface and thus done in the style of a candidate C++ standard library interface. I'll probably end up proposing it as a standard C++ library if it proves to be reasonably portable and useful. This is just the most basic parts of the interface -- getting the process ID out of it. However, it helps sketch out some of the boiler plate such as the base class, derived class, shared code, and static factory function. It also introduces a unittest so that I can incrementally ensure this stuff works. However, I've not even compiled this code for Windows yet. I'll try to fix any Windows fallout from the bots, and if I can't fix it I'll revert and get someone on Windows to help out. There isn't a lot more that is mandatory, so soon I'll switch to just stubbing out the Windows side and get Michael Spencer to help with implementation as he can test it directly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171289 91177308-0d34-0410-b5e6-96231b3b80d8
* Test that a landingpad gets the name provided when it was created (see commitDuncan Sands2012-12-21
| | | | | | | 170318). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170886 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an assertion for a likely ilist::splice() contract violation.Jakob Stoklund Olesen2012-12-18
| | | | | | | | | | | | | | | | | | | | | | | The single-element ilist::splice() function supports a noop move: List.splice(I, List, I); The corresponding std::list function doesn't allow that, so add a unit test to document that behavior. This also means that List.splice(I, List, F); is somewhat surprisingly not equivalent to List.splice(I, List, F, next(F)); This patch adds an assertion to catch the illegal case I == F above. Alternatively, we could make I == F a legal noop, but that would make ilist differ even more from std::list. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170443 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix some integer constant warnings by using a suffixNick Kledzik2012-12-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170376 91177308-0d34-0410-b5e6-96231b3b80d8
* re-enable test cases now that traits work with g++. Fix some g++ warningsNick Kledzik2012-12-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170369 91177308-0d34-0410-b5e6-96231b3b80d8
* Temporarily disable test cases until they compile with g++ too.Nick Kledzik2012-12-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170035 91177308-0d34-0410-b5e6-96231b3b80d8
* Unbreak the build. Fallout from r170019.David Blaikie2012-12-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170033 91177308-0d34-0410-b5e6-96231b3b80d8
* Initial implementation of a utility for converting native data Nick Kledzik2012-12-12
| | | | | | | | | | | | structures to and from YAML using traits. The first client will be the test suite of lld. The documentation will show up at: http://llvm.org/docs/YamlIO.html git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170019 91177308-0d34-0410-b5e6-96231b3b80d8
* Reorganize FastMathFlags to be a wrapper around unsigned, and streamline ↵Michael Ilseman2012-12-09
| | | | | | some interfaces. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169712 91177308-0d34-0410-b5e6-96231b3b80d8
* s/AttrListPtr/AttributeSet/g to better label what this class is going to be ↵Bill Wendling2012-12-07
| | | | | | in the near future. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169651 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not run tests MappedMemoryTest.BasicWrite and MultipleWrite unless bothAkira Hatanaka2012-12-05
| | | | | | | MF_READ and MF_WRITE are set. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169439 91177308-0d34-0410-b5e6-96231b3b80d8
* Copy clang/Driver/<Option parsing stuff> to llvm.Michael J. Spencer2012-12-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169344 91177308-0d34-0410-b5e6-96231b3b80d8
* Sort the #include lines for unittest/...Chandler Carruth2012-12-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169250 91177308-0d34-0410-b5e6-96231b3b80d8
* VMCoreTests/PassManagerTest.cpp: Appease msvc not to do "using llvm::Pass" ↵NAKAMURA Takumi2012-12-04
| | | | | | | | in class template. FIXME: I have not checked whether to be compiled on msvc11. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169225 91177308-0d34-0410-b5e6-96231b3b80d8
* Add 'using' declarations to suppress -Woverloaded-virtual warnings.Matt Beaumont-Gay2012-12-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169214 91177308-0d34-0410-b5e6-96231b3b80d8
* [Support] Make FileOutputBuffer work on Windows.Michael J. Spencer2012-12-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169167 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch LLVM_USE_RVALUE_REFERENCES to LLVM_HAS_RVALUE_REFERENCES.Chandler Carruth2012-11-30
| | | | | | | | | | | | | | Rationale: 1) This was the name in the comment block. ;] 2) It matches Clang's __has_feature naming convention. 3) It matches other compiler-feature-test conventions. Sorry for the noise. =] I've also switch the comment block to use a \brief tag and not duplicate the name. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168996 91177308-0d34-0410-b5e6-96231b3b80d8
* copyFastMathFlags utility and test caseMichael Ilseman2012-11-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168943 91177308-0d34-0410-b5e6-96231b3b80d8
* Whoops, fixed bad mergeMichael Ilseman2012-11-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168816 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed bad test caseMichael Ilseman2012-11-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168815 91177308-0d34-0410-b5e6-96231b3b80d8
* Fast-math: IRBuilder test for creating instructions with fast-math flagsMichael Ilseman2012-11-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168814 91177308-0d34-0410-b5e6-96231b3b80d8
* Add backreference matching capabilities to Support/Regex, withEli Bendersky2012-11-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | appropriate unit tests. This change in itself is not expected to affect any functionality at this point, but it will serve as a stepping stone to improve FileCheck's variable matching capabilities. Luckily, our regex implementation already supports backreferences, although a bit of hacking is required to enable it. It supports both Basic Regular Expressions (BREs) and Extended Regular Expressions (EREs), without supporting backrefs for EREs, following POSIX strictly in this respect. And EREs is what we actually use (rightly). This is contrary to many implementations (including the default on Linux) of POSIX regexes, that do allow backrefs in EREs. Adding backref support to our EREs is a very simple change in the regcomp parsing code. I fail to think of significant cases where it would clash with existing things, and can bring more versatility to the regexes we write. There's always the danger of a backref in a specially crafted regex causing exponential matching times, but since we mainly use them for testing purposes I don't think it's a big problem. [it can also be placed behind a flag specific to FileCheck, if needed]. For more details, see: * http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-November/055840.html * http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20121126/156878.html git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168802 91177308-0d34-0410-b5e6-96231b3b80d8
* Moving SectionMemoryManager into RuntimeDyld and adding unit tests for it.Andrew Kaylor2012-11-27
| | | | | | | | The SectionMemoryManager now supports (and requires) applying section-specific page permissions. Clients using this memory manager must call either MCJIT::finalizeObject() or SectionMemoryManager::applyPermissions() before executing JITed code. See r168718 for changes from the previous implementation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168721 91177308-0d34-0410-b5e6-96231b3b80d8
* Implementing page permission setting in MCJIT unit test SectionMemoryManager.cppAndrew Kaylor2012-11-27
| | | | | | This commit is primarily here for the revision history. I'm about to move the SectionMemoryManager into the RuntimeDyld library, but I wanted to check the changes in here so people could see the differences in the updated implementation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168718 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow using MemoryBuffers with yaml::Stream directly.Sean Silva2012-11-19
| | | | | | | | | | The rationale is to get YAML filenames in diagnostics from yaml::Stream::printError -- currently the filename is hard-coded as "YAML" because there's no buffer information available. Patch by Kim Gräsman! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168341 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a new function to ConstantExpr - getAsInstruction. This returns its ↵James Molloy2012-11-17
| | | | | | | | | | Instruction* corollary, which may be useful if a user wishes to transform a ConstantExpr so that one of its operands is no longer constant. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168262 91177308-0d34-0410-b5e6-96231b3b80d8
* Removing utf-8 smart quote and trailing whitespaceJoe Abbey2012-11-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168253 91177308-0d34-0410-b5e6-96231b3b80d8
* Suppressing the 'direct base ‘{anonymous}::S1’ inaccessible in ↵Joe Abbey2012-11-17
| | | | | | | | | | ‘{anonymous}::D9’ due to ambiguity' warning. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168251 91177308-0d34-0410-b5e6-96231b3b80d8
* Interface changes to allow RuntimeDyld memory managers to set memory ↵Andrew Kaylor2012-11-15
| | | | | | permissions after an object has been loaded. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168114 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove DOS line endings.Jakub Staszak2012-11-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167968 91177308-0d34-0410-b5e6-96231b3b80d8
* do not play preprocessor tricks with 'private', use public interfaces ↵Gabor Greif2012-11-12
| | | | | | instead; this appeases the VC++ buildbots git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167724 91177308-0d34-0410-b5e6-96231b3b80d8
* add unit test for waymarking algorithm (Use::getUser)Gabor Greif2012-11-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167720 91177308-0d34-0410-b5e6-96231b3b80d8
* Provide definitions for all functions.Benjamin Kramer2012-11-10
| | | | | | | ICC refuses to compile a class in an anonymous namespace if some functions aren't defined. Fixes PR13477. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167676 91177308-0d34-0410-b5e6-96231b3b80d8
* Drop the limitation to IEEE floating point types from the fdiv of pow2 -> ↵Benjamin Kramer2012-11-08
| | | | | | | | fmul transform. This is safe for x87 long doubles and ppc double doubles too. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167582 91177308-0d34-0410-b5e6-96231b3b80d8
* MCJIT unit test: add calls to ensure that instruction caches are properly ↵Amara Emerson2012-10-31
| | | | | | invalidated before code execution. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167146 91177308-0d34-0410-b5e6-96231b3b80d8
* Port lli bug fix from r166920 to MCJIT unit test.Amara Emerson2012-10-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167145 91177308-0d34-0410-b5e6-96231b3b80d8
* Commit access test.Amara Emerson2012-10-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167144 91177308-0d34-0410-b5e6-96231b3b80d8
* Disable all old-JIT unit tests on PowerPC.Ulrich Weigand2012-10-31
| | | | | | | | | These tests were all failing since the old JIT doesn't work for PowerPC (any more), and there are no plans to attempt to fix it again (instead, work focuses on MCJIT). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167133 91177308-0d34-0410-b5e6-96231b3b80d8
* Add IRBuilderBase::getIntPtrTy.Evgeniy Stepanov2012-10-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167111 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix isEliminableCastPair to work correctly in the presence of pointersDuncan Sands2012-10-30
| | | | | | | with different sizes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167018 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement arithmetic on APFloat with PPCDoubleDouble semantics byUlrich Weigand2012-10-29
| | | | | | | | | | | | | treating it as if it were an IEEE floating-point type with 106-bit mantissa. This makes compile-time arithmetic on "long double" for PowerPC in clang (in particular parsing of floating point constants) work, and fixes all "long double" related failures in the test suite. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166951 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed bug in SmallDenseMap where it wouldn't leave enough space for an empty ↵Pete Cooper2012-10-23
| | | | | | bucket if the number of values was exactly equal to the small capacity. This led to an infinite loop when finding a non-existent element git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166492 91177308-0d34-0410-b5e6-96231b3b80d8
* Use an export list when building JIT unittests. <rdar://problem/12473675>Bob Wilson2012-10-18
| | | | | | | | | When building with LTO, the internalize pass is hiding some global symbols that are necessary for the JIT unittests. It seems like that may be a bug in LTO to do that by default, but until that gets fixed, this change makes sure that we export the necessary symbols for the tests to pass. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166220 91177308-0d34-0410-b5e6-96231b3b80d8
* Marked this variable as 'used' so that LTO doesn't get rid of it.Bill Wendling2012-10-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166092 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a bug in the set(I,E)/reset(I,E) methods that I recently added. The ↵Owen Anderson2012-10-16
| | | | | | boundary condition for checking if I and E were in the same word were incorrect, and, beyond that, the mask computation was not using a wide enough constant. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166015 91177308-0d34-0410-b5e6-96231b3b80d8
* Add range-based set()/reset() to BitVector. These allow fast ↵Owen Anderson2012-10-15
| | | | | | setting/resetting of ranges of bits, particularly useful when dealing with very large BitVector's. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165984 91177308-0d34-0410-b5e6-96231b3b80d8
* Update CMake build.Benjamin Kramer2012-10-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165908 91177308-0d34-0410-b5e6-96231b3b80d8