summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support
Commit message (Collapse)AuthorAgeFilesLines
...
* Flesh out a page size accessor in the new API.Chandler Carruth2012-12-313-12/+21
| | | | | | | | 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. llvm-svn: 171330
* Remove an unused function in the old Process interface.Chandler Carruth2012-12-312-28/+0
| | | | llvm-svn: 171327
* Switch this code to a more idiomatic double using namespace directive.Chandler Carruth2012-12-313-6/+3
| | | | | | | | Fix a truly odd namespace qualifier that was flat out wrong in the process. The fully qualified namespace would have been llvm::sys::TimeValue, llvm::TimeValue makes no sense. llvm-svn: 171292
* Delete a cut/paste-o from r171290. Very sorry about the noise.Chandler Carruth2012-12-311-1/+0
| | | | llvm-svn: 171291
* Suppress a MSVC warning complaining about the code working as intended.Chandler Carruth2012-12-311-0/+13
| | | | llvm-svn: 171290
* Begin sketching out the process interface.Chandler Carruth2012-12-313-1/+33
| | | | | | | | | | | | | | | | | | | | | | | 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. llvm-svn: 171289
* Fix whitespace. No functionality change.Nick Lewycky2012-12-251-2/+2
| | | | llvm-svn: 171051
* Don't call back() on an empty SmallVector. Found by -fsanitize=enum!Richard Smith2012-12-221-1/+1
| | | | llvm-svn: 170968
* Remove duplicate includes.Roman Divacky2012-12-211-1/+0
| | | | llvm-svn: 170902
* Rename the 'Attributes' class to 'Attribute'. It's going to represent a ↵Bill Wendling2012-12-191-1/+1
| | | | | | single attribute in the future. llvm-svn: 170502
* Define getHostCPUFeatures for ARM Linux platformHao Liu2012-12-131-0/+58
| | | | llvm-svn: 170085
* YAMLIO: Remove all of the template instantiation hacks, I don't see why ↵Benjamin Kramer2012-12-121-397/+318
| | | | | | | | they're necessary and it breaks linking of the unit tests. Also comes with a clang-format run on the cpp file, it had major style violations. llvm-svn: 170036
* Fix calls to getAsSignedInteger() to use long long - not int64_tNick Kledzik2012-12-121-21/+25
| | | | llvm-svn: 170030
* Fix the build on case sensitive file systems.Benjamin Kramer2012-12-121-4/+2
| | | | llvm-svn: 170021
* Initial implementation of a utility for converting native data Nick Kledzik2012-12-122-0/+882
| | | | | | | | | 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 llvm-svn: 170019
* Make NaCl naming consistent. The triple OSType is called NaCl and is representedEli Bendersky2012-12-041-2/+2
| | | | | | | | | textually as NativeClient. Also added a link to the native client project for readers unfamiliar with it. A Clang patch will follow shortly. llvm-svn: 169291
* Sort includes for all of the .h files under the 'lib' tree. These wereChandler Carruth2012-12-041-3/+3
| | | | | | | | | | missed in the first pass because the script didn't yet handle include guards. Note that the script is now able to handle all of these headers without manual edits. =] llvm-svn: 169224
* Add a comment about the requirement that the Windows.h header be last.Chandler Carruth2012-12-041-0/+2
| | | | | | | This comment has the dual effect of blocking reorderings with the sort_include script. llvm-svn: 169221
* [Support] Make FileOutputBuffer work on Windows.Michael J. Spencer2012-12-031-55/+27
| | | | llvm-svn: 169167
* [Support][FileSystem] Fix open mode in resize_file on Windows.Michael J. Spencer2012-12-031-1/+1
| | | | llvm-svn: 169166
* Revert the header sort on this file.Michael J. Spencer2012-12-031-1/+1
| | | | | | | | "Windows.h" includes <Windows.h> which defines a bunch of stuff it shouldn't (even with all the restriction macros). We have no control over this file, so make it's scope as small as possible. llvm-svn: 169165
* Use the new script to sort the includes of every file under lib.Chandler Carruth2012-12-0340-87/+83
| | | | | | | | | | | | | | | | | Sooooo many of these had incorrect or strange main module includes. I have manually inspected all of these, and fixed the main module include to be the nearest plausible thing I could find. If you own or care about any of these source files, I encourage you to take some time and check that these edits were sensible. I can't have broken anything (I strictly added headers, and reordered them, never removed), but they may not be the headers you'd really like to identify as containing the API being implemented. Many forward declarations and missing includes were added to a header files to allow them to parse cleanly when included first. The main module rule does in fact have its merits. =] llvm-svn: 169131
* Add support for fission attributes/forms/operations -> string.Eric Christopher2012-11-301-0/+16
| | | | llvm-svn: 169056
* Fix a bug in APFloat.cpp: declare APFloat after fltSemantics itAlexey Samsonov2012-11-301-1/+3
| | | | | | | | | | | uses. APFloat::convert() takes the pointer to the fltSemantics variable, which is later accessed it in ~APFloat() desctructor. That is, semantics must still be alive at the moment we delete APFloat. Found by experimental AddressSanitizer use-after-scope checker. llvm-svn: 169047
* Switch LLVM_USE_RVALUE_REFERENCES to LLVM_HAS_RVALUE_REFERENCES.Chandler Carruth2012-11-303-3/+3
| | | | | | | | | | | | | | 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. llvm-svn: 168996
* Add backreference matching capabilities to Support/Regex, withEli Bendersky2012-11-282-2/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 llvm-svn: 168802
* Allow using MemoryBuffers with yaml::Stream directly.Sean Silva2012-11-191-0/+20
| | | | | | | | | | 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! llvm-svn: 168341
* move irrelevant attribution.Chris Lattner2012-11-161-3/+1
| | | | llvm-svn: 168182
* PathV2: Fix a possible infinite loop.Daniel Dunbar2012-11-151-3/+4
| | | | | | | | | | - The code could infinite loop trying to create unique files, if the directory containing the unique file exists, but open() calls on non-existent files in the path return ENOENT. This is true on the /dev/fd filesystem, for example. - Will add a clang side test case for this. llvm-svn: 168081
* Add support for SPIR64 target - the 64bit counterpart of SPIR.Guy Benyei2012-11-151-2/+10
| | | | | | The new OpenCL SPIR extension spec will define separate SPIR for 32 and 64 bit architectures. llvm-svn: 168036
* Remove the CellSPU port.Eric Christopher2012-11-141-8/+0
| | | | | | Approved by Chris Lattner. llvm-svn: 167984
* Revert 167755/167760. We don't want to emit crash diagnostics on ↵Chad Rosier2012-11-131-4/+1
| | | | | | command-line syntax errors. llvm-svn: 167849
* Revert r167620; this can be implemented using an existing CL option.Chad Rosier2012-11-121-1/+4
| | | | llvm-svn: 167755
* Drop the limitation to IEEE floating point types from the fdiv of pow2 -> ↵Benjamin Kramer2012-11-081-5/+0
| | | | | | | | fmul transform. This is safe for x87 long doubles and ppc double doubles too. llvm-svn: 167582
* MemoryBuffer: Windows doesn't define S_IFIFO.Daniel Dunbar2012-11-061-1/+4
| | | | llvm-svn: 167467
* MemoryBuffer: Support reading named pipes in getFile().Daniel Dunbar2012-11-051-16/+29
| | | | | | - We only support this when the client didn't claim to know the file size. llvm-svn: 167407
* XLC supports the same atomic functions as GCC, use them.Rafael Espindola2012-11-021-5/+9
| | | | | | Patch by Kai. llvm-svn: 167309
* [Support] Fix StrError on Windows to actually return the error string...Michael J. Spencer2012-11-011-1/+3
| | | | llvm-svn: 167191
* Remove Triple::getArchTypeForDarwinArchName. I lives on the clang driver now.Rafael Espindola2012-10-311-32/+0
| | | | llvm-svn: 167157
* Add support for Cortex-A15 host recognition.James Molloy2012-10-311-0/+1
| | | | | | No testcase, as this is only testable on a C-A15 board. llvm-svn: 167108
* APFloat cleanup: Remove now unused "arithmeticOK" logic.Ulrich Weigand2012-10-291-42/+8
| | | | llvm-svn: 166954
* APFloat cleanup: Remove now unused fields "sign2" and "exponent2".Ulrich Weigand2012-10-291-21/+9
| | | | llvm-svn: 166952
* Implement arithmetic on APFloat with PPCDoubleDouble semantics byUlrich Weigand2012-10-291-76/+65
| | | | | | | | | | | | 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. llvm-svn: 166951
* Don't explicitly require RTTI and EH.Joerg Sonnenberger2012-10-262-9/+0
| | | | llvm-svn: 166772
* Support: Don't remove special files on signals.Daniel Dunbar2012-10-171-9/+21
| | | | | | | - Similar to Path::eraseFromDisk(), we don't want LLVM to remove things like /dev/null, even if it has the permission. llvm-svn: 166105
* Add powerpc-ibm-aix to Triple. Patch by Kai.Duncan Sands2012-10-121-0/+4
| | | | llvm-svn: 165792
* Revert r165652: "Remove unnecessary RTTI from the build."Sean Silva2012-10-102-0/+5
| | | | | | ... Apparently the RTTI is still necessary for some reason. llvm-svn: 165654
* Remove unnecessary RTTI from the build.Sean Silva2012-10-102-5/+0
| | | | llvm-svn: 165652
* Enable response files in all tools. Patch by Liu, Yaxun (Sam). I have simplifiedRafael Espindola2012-10-091-15/+11
| | | | | | the test. llvm-svn: 165535
* Improve overflow detection in StringRef::getAsUnsignedInteger().Nick Kledzik2012-10-021-2/+2
| | | | llvm-svn: 165038
OpenPOWER on IntegriCloud