summaryrefslogtreecommitdiff
path: root/unittests/Support
Commit message (Collapse)AuthorAge
...
* Move all of the header files which are involved in modelling the LLVM IRChandler Carruth2013-01-02
| | | | | | | | | | | | | | | | | | | | | into their new header subdirectory: include/llvm/IR. This matches the directory structure of lib, and begins to correct a long standing point of file layout clutter in LLVM. There are still more header files to move here, but I wanted to handle them in separate commits to make tracking what files make sense at each layer easier. The only really questionable files here are the target intrinsic tablegen files. But that's a battle I'd rather not fight today. I've updated both CMake and Makefile build systems (I think, and my tests think, but I may have missed something). I've also re-sorted the includes throughout the project. I'll be committing updates to Clang, DragonEgg, and Polly momentarily. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171366 91177308-0d34-0410-b5e6-96231b3b80d8
* 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
* 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
* 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
* 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
* [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
* 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
* 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
* 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
* 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
* 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
* Casting.h: Automatically handle isa<Base>(Derived).Sean Silva2012-10-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | Additionally, all such cases are handled with no dynamic check. All `classof()` of the form class Foo { [...] static bool classof(const Bar *) { return true; } [...] } where Foo is an ancestor of Bar are no longer necessary. Don't write them! Note: The exact test is `is_base_of<Foo, Bar>`, which is non-strict, so that Foo is considered an ancestor of itself. This leads to the following rule of thumb for LLVM-style RTTI: The argument type of `classof()` should be a strict ancestor. For more information about implementing LLVM-style RTTI, see docs/HowToSetUpLLVMStyleRTTI.rst git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165765 91177308-0d34-0410-b5e6-96231b3b80d8
* Adding MCJIT and MemoryBuffer unit testsAndrew Kaylor2012-10-04
| | | | | | Patch by Daniel Malea. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165246 91177308-0d34-0410-b5e6-96231b3b80d8
* This patch adds memory support functions which will later be used to ↵Andrew Kaylor2012-09-19
| | | | | | implement section-specific protection handling in MCJIT. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164249 91177308-0d34-0410-b5e6-96231b3b80d8
* cmake: Fix file path.Daniel Dunbar2012-09-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163950 91177308-0d34-0410-b5e6-96231b3b80d8
* formatted_raw_ostream: Fix a serious bug in tell().Daniel Dunbar2012-09-14
| | | | | | | | | - The current_pos function is supposed to return all the written bytes, not the current position of the underlying stream. - This caused tell() to be broken whenever the underlying stream had buffered content. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163948 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix up erroneous alignas usage while making this portable to GCC 4.7David Blaikie2012-09-14
| | | | | | Review by Chandler Carruth. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163944 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't pass a null pointer to cast<> in its unit tests.Richard Smith2012-08-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162310 91177308-0d34-0410-b5e6-96231b3b80d8
* DataExtractor: Fix integer truncation issues in LEB128 extraction.Benjamin Kramer2012-08-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162201 91177308-0d34-0410-b5e6-96231b3b80d8
* Flatten the aligned-char-array utility template to be a directlyChandler Carruth2012-08-17
| | | | | | | templated union at the request of Richard Smith. This makes it substantially easier to type. =] git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162072 91177308-0d34-0410-b5e6-96231b3b80d8
* Properly test the LLVM_USE_RVALUE_REFERENCES macro.Michael J. Spencer2012-08-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161979 91177308-0d34-0410-b5e6-96231b3b80d8
* [PathV2] Add mapped_file_region. Implementation for Windows and POSIX.Michael J. Spencer2012-08-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161976 91177308-0d34-0410-b5e6-96231b3b80d8
* Added test for non-static use of cl::opt (fixed in r160170)Alexander Kornienko2012-08-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161751 91177308-0d34-0410-b5e6-96231b3b80d8
* Initial commit of new FileOutputBuffer support class. Nick Kledzik2012-08-01
| | | | | | | | | Since the llvm::sys::fs::map_file_pages() support function it relies on is not yet implemented on Windows, the unit tests for FileOutputBuffer are currently conditionalized to run only on unix. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161099 91177308-0d34-0410-b5e6-96231b3b80d8
* Suppress stderr noise when test case runs.Nick Kledzik2012-07-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161085 91177308-0d34-0410-b5e6-96231b3b80d8
* make ConstantRange::zeroExtend() optimalNuno Lopes2012-07-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160643 91177308-0d34-0410-b5e6-96231b3b80d8
* teach ConstantRange that zero times X is always zeroNuno Lopes2012-07-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160317 91177308-0d34-0410-b5e6-96231b3b80d8
* make ConstantRange::getSetSize() properly compute the size of wrapped and ↵Nuno Lopes2012-07-16
| | | | | | | | full sets. Make it always return APInts with the same bitwidth for the same ConstantRange bitwidth to simply clients git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160294 91177308-0d34-0410-b5e6-96231b3b80d8
* Move the IRBuilder unittest from Support to VMCore. This got missed inChandler Carruth2012-07-16
| | | | | | the original move of IRBuilder. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160249 91177308-0d34-0410-b5e6-96231b3b80d8
* Move llvm/Support/TypeBuilder.h -> llvm/TypeBuilder.h. This completesChandler Carruth2012-07-15
| | | | | | | | | | | | the move of *Builder classes into the Core library. No uses of this builder in Clang or DragonEgg I could find. If there is a desire to have an IR-building-support library that contains all of these builders, that can be easily added, but currently it seems likely that these add no real overhead to VMCore. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160243 91177308-0d34-0410-b5e6-96231b3b80d8
* Move llvm/Support/MDBuilder.h to llvm/MDBuilder.h, to live withChandler Carruth2012-07-15
| | | | | | | | | | | IRBuilder, DIBuilder, etc. This is the proper layering as MDBuilder can't be used (or implemented) without the Core Metadata representation. Patches to Clang and Dragonegg coming up. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160237 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "IntRange:" as it appears to be breaking self hosting.Eric Christopher2012-07-02
| | | | | | This reverts commit b2833d9dcba88c6f0520cad760619200adc0442c. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159618 91177308-0d34-0410-b5e6-96231b3b80d8
* IntRange:Stepan Dyatkovskiy2012-07-02
| | | | | | | | | | | | | | | | | | | | | | | | - Changed isSingleNumber method behaviour. Now this flag is calculated on demand. IntegersSubsetMapping - Optimized diff operation. - Replaced type of Items field from std::list with std::map. - Added new methods: bool isOverlapped(self &RHS) void add(self& RHS, SuccessorClass *S) void detachCase(self& NewMapping, SuccessorClass *Succ) void removeCase(SuccessorClass *Succ) SuccessorClass *findSuccessor(const IntTy& Val) const IntTy* getCaseSingleNumber(SuccessorClass *Succ) IntegersSubsetTest - DiffTest: Added checks for successors. SimplifyCFG Updated SwitchInst usage (now it is case-ragnes compatible) for - SimplifyEqualityComparisonWithOnlyPredecessor - FoldValueComparisonIntoPredecessors git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159527 91177308-0d34-0410-b5e6-96231b3b80d8
* Move llvm/Support/IRBuilder.h -> llvm/IRBuilder.hChandler Carruth2012-06-29
| | | | | | | | | | | | | | | | | This was always part of the VMCore library out of necessity -- it deals entirely in the IR. The .cpp file in fact was already part of the VMCore library. This is just a mechanical move. I've tried to go through and re-apply the coding standard's preferred header sort, but at 40-ish files, I may have gotten some wrong. Please let me know if so. I'll be committing the corresponding updates to Clang and Polly, and Duncan has DragonEgg. Thanks to Bill and Eric for giving the green light for this bit of cleanup. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159421 91177308-0d34-0410-b5e6-96231b3b80d8
* add ConstantRange::difference (to perform set difference/relative complement)Nuno Lopes2012-06-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159352 91177308-0d34-0410-b5e6-96231b3b80d8
* fix a off-by-one bug in intersectWith(), and add a bunch of testsNuno Lopes2012-06-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159319 91177308-0d34-0410-b5e6-96231b3b80d8
* IntegersSubsetTest: Due to compilation failure with -std=c11, replaced -1UL ↵Stepan Dyatkovskiy2012-06-26
| | | | | | with NOT_A_NUMBER constant (0xffff). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159207 91177308-0d34-0410-b5e6-96231b3b80d8
* IntegersSubsetMapping: implemented "diff" operation. Operation allows at the ↵Stepan Dyatkovskiy2012-06-26
| | | | | | | | | | | | | | | same time perform up to three operations: - LHS exclude RHS - LHS intersect RHS (LHS successors will keeped) - RHS exclude LHS The complexity is N+M, where N is size of LHS M is size of RHS. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159201 91177308-0d34-0410-b5e6-96231b3b80d8
* IntegersSubsetMapping: removed exclude operation, it will replaced with more ↵Stepan Dyatkovskiy2012-06-26
| | | | | | | | | | universal "diff" operation in next commit. Changes was separated onto two commits for better readability. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159200 91177308-0d34-0410-b5e6-96231b3b80d8
* unittests/Support/Path.cpp: [Win32] Suppress FileSystemTest.FileMapping for now.NAKAMURA Takumi2012-06-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159099 91177308-0d34-0410-b5e6-96231b3b80d8
* unittests/Support/Path.cpp: [Win32] Suppress FileSystemTest.Permissions for now.NAKAMURA Takumi2012-06-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159098 91177308-0d34-0410-b5e6-96231b3b80d8