- Mar 04, 2014
-
-
Chandler Carruth authored
a bit surprising, as the class is almost entirely abstracted away from any particular IR, however it encodes the comparsion predicates which mutate ranges as ICmp predicate codes. This is reasonable as they're used for both instructions and constants. Thus, it belongs in the IR library with instructions and constants. llvm-svn: 202838
-
Chandler Carruth authored
Move the test for this class into the IR unittests as well. This uncovers that ValueMap too is in the IR library. Ironically, the unittest for ValueMap is useless in the Support library (honestly, so was the ValueHandle test) and so it already lives in the IR unittests. Mmmm, tasty layering. llvm-svn: 202821
-
- Mar 02, 2014
-
-
Craig Topper authored
llvm-svn: 202621
-
Chandler Carruth authored
directly, and remove the macro. llvm-svn: 202612
-
- Mar 01, 2014
-
-
Chandler Carruth authored
llvm-svn: 202587
-
Chandler Carruth authored
llvm-svn: 202583
-
- Feb 26, 2014
-
-
David Blaikie authored
llvm-svn: 202286
-
- Feb 24, 2014
-
-
Rafael Espindola authored
After this I will set the default back to F_None. The advantage is that before this patch forgetting to set F_Binary would corrupt a file on windows. Forgetting to set F_Text produces one that cannot be read in notepad, which is a better failure mode :-) llvm-svn: 202052
-
Rafael Espindola authored
llvm-svn: 202050
-
- Feb 23, 2014
-
-
Rafael Espindola authored
Before this patch they would take an boolean argument to say if the path already existed. This was redundant with the returned error_code which is able to represent that. This allowed for callers to incorrectly check only the existed flag instead of first checking the error code. Instead, pass in a boolean flag to say if the previous (non-)existence should be an error or not. Callers of the of the old simple versions are not affected. They still ignore the previous (non-)existence as they did before. llvm-svn: 201979
-
- Feb 22, 2014
-
-
Logan Chien authored
This commit moves getSLEB128Size() and getULEB128Size() from MCAsmInfo to LEB128.h and removes some copy-and-paste code. Besides, this commit also adds some unit tests for the LEB128 functions. llvm-svn: 201937
-
- Feb 11, 2014
-
-
Dmitri Gribenko authored
only current user should be using toEpochTime() instead. llvm-svn: 201136
-
- Feb 05, 2014
-
-
Nick Kledzik authored
Now to copy a string into a BumpPtrAllocator and get a StringRef to the copy: StringRef myCopy = myStr.copy(myAllocator); llvm-svn: 200885
-
- Feb 04, 2014
-
-
Chandler Carruth authored
In file included from ../unittests/Support/ProcessTest.cpp:11: ../utils/unittest/googletest/include/gtest/gtest.h:1448:28: warning: comparison of integers of different signs: 'const unsigned int' and 'const int' [-Wsign-compare] GTEST_IMPL_CMP_HELPER_(NE, !=); ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ ../utils/unittest/googletest/include/gtest/gtest.h:1433:12: note: expanded from macro 'GTEST_IMPL_CMP_HELPER_' if (val1 op val2) {\ ^ ../unittests/Support/ProcessTest.cpp:46:3: note: in instantiation of function template specialization 'testing::internal::CmpHelperNE<unsigned int, int>' requested here EXPECT_NE((r1 | r2), 0); ^ llvm-svn: 200801
-
Aaron Ballman authored
Patch thanks to Stephan Tolksdorf! llvm-svn: 200767
-
- Feb 01, 2014
-
-
Peter Collingbourne authored
This will be used by the line editor library to derive a default path to the history file. Differential Revision: http://llvm-reviews.chandlerc.com/D2199 llvm-svn: 200594
-
- Jan 29, 2014
-
-
Jordan Rose authored
Oops! llvm-svn: 200412
-
Jordan Rose authored
This can still be overridden by explicitly setting a value requirement on the alias option, but by default it should be the same. PR18649 llvm-svn: 200407
-
- Jan 28, 2014
-
-
Nick Kledzik authored
Makes it easy to use BumpPtrAllocator to make a copy of StringRef strings. llvm-svn: 200331
-
- Jan 24, 2014
-
-
Alp Toker authored
Sweep the codebase for common typos. Includes some changes to visible function names that were misspelt. llvm-svn: 200018
-
- Jan 17, 2014
-
-
Rafael Espindola authored
llvm-svn: 199437
-
- Jan 10, 2014
-
-
Rafael Espindola authored
llvm-svn: 198955
-
- Jan 09, 2014
-
-
Rafael Espindola authored
I would not normally add tests like these, but the copy constructor is not used at all in our codebase with c++11, so having this tests might prevent breaking the c++03 build again. llvm-svn: 198886
-
- Jan 08, 2014
-
-
Rafael Espindola authored
llvm-svn: 198799
-
- Jan 07, 2014
-
-
Chandler Carruth authored
subsequent changes are easier to review. About to fix some layering issues, and wanted to separate out the necessary churn. Also comment and sink the include of "Windows.h" in three .inc files to match the usage in Memory.inc. llvm-svn: 198685
-
- Jan 02, 2014
-
-
David Blaikie authored
Based on a patch by Maciej Piechotka. llvm-svn: 198334
-
- Dec 27, 2013
-
-
Chandler Carruth authored
This is an iterator which you can build around a MemoryBuffer. It will iterate through the non-empty, non-comment lines of the buffer as a forward iterator. It should be small and reasonably fast (although it could be made much faster if anyone cares, I don't really...). This will be used to more simply support the text-based sample profile file format, and is largely based on the original patch by Diego. I've re-worked the style of it and separated it from the work of producing a MemoryBuffer from a file which both simplifies the interface and makes it easier to test. The style of the API follows the C++ standard naming conventions to fit in better with iterators in general, much like the Path and FileSystem interfaces follow standard-based naming conventions. llvm-svn: 198068
-
- Dec 25, 2013
-
-
NAKAMURA Takumi authored
llvm-svn: 198011
-
- Dec 19, 2013
-
-
Hans Wennborg authored
According to the docs, ThreadLocal<>::get() should return NULL if no object has been set. This patch makes that the case also for non-thread builds and adds a very basic unit test to check it. (This was causing PR18205 because PrettyStackTraceHead didn't get zero- initialized and we'd crash trying to read past the end of that list. We didn't notice this so much on Linux since we'd crash after printing all the entries, but on Mac we print into a SmallString, and would crash before printing that.) llvm-svn: 197718
-
- Dec 14, 2013
-
-
Michael Gottesman authored
llvm-svn: 197302
-
- Dec 12, 2013
-
-
Alp Toker authored
Somewhat counterintuitively the first arg in gtest is treated as the expectation. No change to the tests themselves. llvm-svn: 197124
-
Alp Toker authored
The old AddFixedStringToRegEx() it was based on got away with this for the longest time, but the problem became easy to spot after the cleanup in r197096. Also add a quick unit test to cover regex escaping. llvm-svn: 197121
-
- Nov 22, 2013
-
-
Michael Gottesman authored
llvm-svn: 195411
-
- Nov 21, 2013
-
-
Nick Kledzik authored
MappingTrait template specializations can now have a validate() method which performs semantic checking. For details, see <http://llvm.org/docs/YamlIO.html>. llvm-svn: 195286
-
Nick Kledzik authored
llvm-svn: 195285
-
- Nov 19, 2013
-
-
John Thompson authored
YAML I/O - Added default trait support for std:string. Making another attempt at this, this time doing a clean build on Linux, and running the LLVM, clang, and extra tests, to try to make sure there's no problems. llvm-svn: 195134
-
- Nov 18, 2013
-
-
Alexander Kornienko authored
Fixes http://llvm.org/PR16221, http://llvm.org/PR15927 Phabricator: http://llvm-reviews.chandlerc.com/D1236 Patch by Andrew Tulloch! llvm-svn: 195016
-
- Nov 17, 2013
-
-
Michael Gottesman authored
[block-freq] Add BlockFrequency::scale that returns a remainder from the division and make the private scale in BlockFrequency more performant. This change is the first in a series of changes improving LLVM's Block Frequency propogation implementation to not lose probability mass in branchy code when propogating block frequency information from a basic block to its successors. This patch is a simple infrastructure improvement that does not actually modify the block frequency algorithm. The specific changes are: 1. Changes the division algorithm used when scaling block frequencies by branch probabilities to a short division algorithm. This gives us the remainder for free as well as provides a nice speed boost. When I benched the old routine and the new routine on a Sandy Bridge iMac with disabled turbo mode performing 8192 iterations on an array of length 32768, I saw ~600% increase in speed in mean/median performance. 2. Exposes a scale method that returns a remainder. This is important so we can ensure that when we scale a block frequency by some branch probability BP = N/D, the remainder from the division by D can be retrieved and propagated to other children to ensure no probability mass is lost (more to come on this). llvm-svn: 194950
-
- Nov 15, 2013
-
-
Rui Ueyama authored
Summary: Make identify_magic to recognize COFF import file. Reviewers: Bigcheese CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2165 llvm-svn: 194852
-
- Nov 14, 2013
-
-
Rui Ueyama authored
Summary: Some machine-type-neutral object files containing only undefined symbols actually do exist in the Windows standard library. Need to recognize them as COFF files. Reviewers: Bigcheese CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2164 llvm-svn: 194734
-