summaryrefslogtreecommitdiff
path: root/unittests
Commit message (Collapse)AuthorAge
* Revert r146363 to allow buildbots to make forward progress.Chad Rosier2011-12-12
| | | | | | | | Original commit message: Support/FileSystem: Implement canonicalize. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146378 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/FileSystem: Implement bool equivalent(file_status A, file_status B);Michael J. Spencer2011-12-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146364 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/FileSystem: Implement canonicalize.Michael J. Spencer2011-12-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146363 91177308-0d34-0410-b5e6-96231b3b80d8
* re-enable unittestDylan Noblesmith2011-12-12
| | | | | | Accidentally left out since r145214/r145217. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146356 91177308-0d34-0410-b5e6-96231b3b80d8
* unittests/Support/Path.cpp: [recursive_directory_iterator] Work around for ↵NAKAMURA Takumi2011-12-09
| | | | | | | | end iterator. FIXME: It should be more robust. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146294 91177308-0d34-0410-b5e6-96231b3b80d8
* unittests/SupportTests: Fix test. pop modifies the current entry, thus theMichael J. Spencer2011-12-09
| | | | | | dontlookhere check must be after it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146217 91177308-0d34-0410-b5e6-96231b3b80d8
* unittests/SupportTests: Add some outs()'s to debug the issues on some bots.Michael J. Spencer2011-12-09
| | | | | | | I have run these tests under many configurations on the exact same OS as the failures, and I can't reproduce them :(. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146214 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/FileSystem: Implement recursive_directory_iterator and makeMichael J. Spencer2011-12-08
| | | | | | directory_iterator preserve InputIterator semantics on copy. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146200 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for vectors of pointers.Nadav Rotem2011-12-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145801 91177308-0d34-0410-b5e6-96231b3b80d8
* unittests: add ErrorStr to ExecutionEngine testDylan Noblesmith2011-12-02
| | | | | | Makes failures more self-explanatory. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145704 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix APFloat::convert so that it handles narrowing conversions correctly; itEli Friedman2011-11-26
| | | | | | | | | | was returning incorrect values in rare cases, and incorrectly marking exact conversions as inexact in some more common cases. Fixes PR11406, and a missed optimization in test/CodeGen/X86/fp-stack-O0.ll. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145141 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix Windows build, don't try to #include <pthread.h> when we know it's notNick Lewycky2011-11-14
| | | | | | | available. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144574 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for tsan annotations (thread sanitizer, a valgrind-based tool).Nick Lewycky2011-11-14
| | | | | | | | | | | | | These annotations are disabled entirely when either ENABLE_THREADS is off, or building a release build. When enabled, they add calls to functions with no statements to ManagedStatic's getters. Use these annotations to inform tsan that the race used inside ManagedStatic initialization is actually benign. Thanks to Kostya Serebryany for helping write this patch! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144567 91177308-0d34-0410-b5e6-96231b3b80d8
* unittests/MultiJITTest.cpp: Tweak how to check symbol value for Win32 ↵NAKAMURA Takumi2011-11-09
| | | | | | | | | --enable-shared. getPointerToNamedFunction might be indirect jump on Win32 --enable-shared. FF 25 <disp32>: jmp *(pointer to IAT) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144178 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement comparison operators for BranchProbability in a way that can't ↵Benjamin Kramer2011-10-24
| | | | | | | | overflow INT64_MAX. Add a test case for the edge case that triggers this. Thanks to Chandler for bringing this to my attention. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142794 91177308-0d34-0410-b5e6-96231b3b80d8
* Add compare operators to BranchProbability and use it to determine if an ↵Benjamin Kramer2011-10-23
| | | | | | edge is hot. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142751 91177308-0d34-0410-b5e6-96231b3b80d8
* Enhance llvm::SourceMgr to support diagnostic ranges, the same way clang ↵Chris Lattner2011-10-16
| | | | | | | | | | | | | | | | | does. Enhance the X86 asmparser to produce ranges in the one case that was annoying me, for example: test.s:10:15: error: invalid operand for instruction movl 0(%rax), 0(%edx) ^~~~~~~ It should be straight-forward to enhance filecheck, tblgen, and/or the .ll parser to use ranges where appropriate if someone is interested. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142106 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a bad char heuristic to StringRef::find.Benjamin Kramer2011-10-15
| | | | | | | | | Based on Horspool's simplified version of Boyer-Moore. We use a constant-sized table of uint8_ts to keep cache thrashing low, needles bigger than 255 bytes are uncommon anyways. The worst case is still O(n*m) but we do a lot better on the average case now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142061 91177308-0d34-0410-b5e6-96231b3b80d8
* Attempt to fix MSVC build.Eli Friedman2011-10-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141831 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix APFloat::getLargest so that it actually returns the correct value. ↵Eli Friedman2011-10-12
| | | | | | Found by accident while reviewing a patch to nearby code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141816 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix APInt::operator*= so that it computes the correct result for large ↵Eli Friedman2011-10-07
| | | | | | integers where there is unsigned overflow. Fix APFloat::toString so that it doesn't depend on the incorrect behavior in common cases (and computes the correct result in some rare cases). Fixes PR11086. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141441 91177308-0d34-0410-b5e6-96231b3b80d8
* The product of two chrec's can always be represented as a chrec.Nick Lewycky2011-10-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141066 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a bug in compare_numeric().Jakob Stoklund Olesen2011-09-30
| | | | | | Thanks to Alexandru Dura and Jonas Paulsson for finding it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140859 91177308-0d34-0410-b5e6-96231b3b80d8
* NULL cannot be portably used as the last argument to a function with ↵Eli Friedman2011-09-28
| | | | | | __attribute((sentinel)), even though it usually works. Use (void*)0 instead. PR11002. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140720 91177308-0d34-0410-b5e6-96231b3b80d8
* Add APInt support for converting to/from hexatridecimal stringsDouglas Gregor2011-09-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139695 91177308-0d34-0410-b5e6-96231b3b80d8
* unittests/Support/DataExtractorTest.cpp: Specify ULL explicitly to a few ↵NAKAMURA Takumi2011-09-13
| | | | | | | | constants. It seems i686-cygwin-gcc-4.3 does not accept 64-bit constant without LL. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139664 91177308-0d34-0410-b5e6-96231b3b80d8
* Add the DataExtractor utility class.Benjamin Kramer2011-09-13
| | | | | | | | | | It is an endian-aware helper that can read data from a StringRef. It will come in handy for DWARF parsing. This class is inspired by LLDB's DataExtractor, but is stripped down to the bare minimum needed for DWARF. Comes with unit tests! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139626 91177308-0d34-0410-b5e6-96231b3b80d8
* Exclude more arm jit failures pending PR10783.Andrew Trick2011-09-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139074 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix C++0x narrowing errors when char is unsigned.Jeffrey Yasskin2011-08-30
| | | | | | | In the case of EDInstInfo, this would actually cause a bug when -1 became 255 and was then compared >=0 in llvm-mc/Disassembler.cpp. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138825 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a test that wasn't testing the right thing.Matt Beaumont-Gay2011-08-29
| | | | | | | | The APFloat "Zero" test was actually calling the APFloat(const fltSemantics &, integerPart) constructor, and EXPECT_EQ was treating 0 and -0 as equal. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138745 91177308-0d34-0410-b5e6-96231b3b80d8
* The 'expected' argument to EXPECT_EQ is actually the first one;John McCall2011-08-27
| | | | | | | | flip these tests around. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138708 91177308-0d34-0410-b5e6-96231b3b80d8
* Excluding ARM JIT tests until someone can fix this compilation path.Andrew Trick2011-08-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138676 91177308-0d34-0410-b5e6-96231b3b80d8
* Move TargetRegistry and TargetSelect from Target to Support where they belong.Evan Cheng2011-08-24
| | | | | | | These are strictly utilities for registering targets and components. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138450 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid undefined behaviour if somehow NUM_GRAPHS equals 2^32 (orDuncan Sands2011-07-29
| | | | | | | | whatever the size of unsigned is), though this can't actually occur for any integer value of NUM_NODES. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136460 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove extra semicolon.Jakub Staszak2011-07-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136432 91177308-0d34-0410-b5e6-96231b3b80d8
* Use unsigned rather than uint16_t in case anyone feels like testingDuncan Sands2011-07-28
| | | | | | | | | | more graphs, like all graphs with 5 nodes or less. With a 32 bit unsigned type, the maximum is graphs with 6 nodes or less, but that would take a while to test - 5 nodes or less already requires a few seconds. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136354 91177308-0d34-0410-b5e6-96231b3b80d8
* Check an additional property specific to the way LLVMDuncan Sands2011-07-28
| | | | | | | iterates over SCC's. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136353 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a unittest for the simply connected components (SCC) iterator class.Duncan Sands2011-07-28
| | | | | | | | | This computes every graph with 4 or fewer nodes, and checks that the SCC class indeed returns exactly the simply connected components reachable from the initial node. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136351 91177308-0d34-0410-b5e6-96231b3b80d8
* Add test cases for BlockFrequency.Jakub Staszak2011-07-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136244 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove some code that is no longer needed now that googletest knows howJay Foad2011-07-27
| | | | | | to print STL containers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136213 91177308-0d34-0410-b5e6-96231b3b80d8
* Explicitly cast narrowing conversions inside {}s that will become errors inJeffrey Yasskin2011-07-27
| | | | | | C++0x. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136211 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert GetElementPtrInst to use ArrayRef.Jay Foad2011-07-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135904 91177308-0d34-0410-b5e6-96231b3b80d8
* Add Twine support for characters, and switch twine to use a union internallyChris Lattner2011-07-24
| | | | | | | to eliminate some casting. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135888 91177308-0d34-0410-b5e6-96231b3b80d8
* Add APInt(numBits, ArrayRef<uint64_t> bigVal) constructor to prevent future ↵Jeffrey Yasskin2011-07-18
| | | | | | | | | ambiguity errors like the one corrected by r135261. Migrate all LLVM callers of the old constructor to the new one. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135431 91177308-0d34-0410-b5e6-96231b3b80d8
* land David Blaikie's patch to de-constify Type, with a few tweaks.Chris Lattner2011-07-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135375 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an APFloat::convertToInt(APSInt) function that automatically manages theJeffrey Yasskin2011-07-15
| | | | | | memory for the result. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135259 91177308-0d34-0410-b5e6-96231b3b80d8
* The key of a StringMap can contain nul's in it, so having first() returnChris Lattner2011-07-14
| | | | | | | const char* doesn't make sense. Have it return StringRef instead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135167 91177308-0d34-0410-b5e6-96231b3b80d8
* Second attempt at de-constifying LLVM Types in FunctionType::get(),Jay Foad2011-07-12
| | | | | | StructType::get() and TargetData::getIntPtrType(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134982 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r134893 and r134888 (and related patches in other trees). It was causingBill Wendling2011-07-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | an assert on Darwin llvm-gcc builds. Assertion failed: (castIsValid(op, S, Ty) && "Invalid cast!"), function Create, file /Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.llvm-gcc-i386-darwin9-RA/llvm.src/lib/VMCore/Instructions.cpp, li\ ne 2067. etc. http://smooshlab.apple.com:8013/builders/llvm-gcc-i386-darwin9-RA/builds/2354 --- Reverse-merging r134893 into '.': U include/llvm/Target/TargetData.h U include/llvm/DerivedTypes.h U tools/bugpoint/ExtractFunction.cpp U unittests/Support/TypeBuilderTest.cpp U lib/Target/ARM/ARMGlobalMerge.cpp U lib/Target/TargetData.cpp U lib/VMCore/Constants.cpp U lib/VMCore/Type.cpp U lib/VMCore/Core.cpp U lib/Transforms/Utils/CodeExtractor.cpp U lib/Transforms/Instrumentation/ProfilingUtils.cpp U lib/Transforms/IPO/DeadArgumentElimination.cpp U lib/CodeGen/SjLjEHPrepare.cpp --- Reverse-merging r134888 into '.': G include/llvm/DerivedTypes.h U include/llvm/Support/TypeBuilder.h U include/llvm/Intrinsics.h U unittests/Analysis/ScalarEvolutionTest.cpp U unittests/ExecutionEngine/JIT/JITTest.cpp U unittests/ExecutionEngine/JIT/JITMemoryManagerTest.cpp U unittests/VMCore/PassManagerTest.cpp G unittests/Support/TypeBuilderTest.cpp U lib/Target/MBlaze/MBlazeIntrinsicInfo.cpp U lib/Target/Blackfin/BlackfinIntrinsicInfo.cpp U lib/VMCore/IRBuilder.cpp G lib/VMCore/Type.cpp U lib/VMCore/Function.cpp G lib/VMCore/Core.cpp U lib/VMCore/Module.cpp U lib/AsmParser/LLParser.cpp U lib/Transforms/Utils/CloneFunction.cpp G lib/Transforms/Utils/CodeExtractor.cpp U lib/Transforms/Utils/InlineFunction.cpp U lib/Transforms/Instrumentation/GCOVProfiling.cpp U lib/Transforms/Scalar/ObjCARC.cpp U lib/Transforms/Scalar/SimplifyLibCalls.cpp U lib/Transforms/Scalar/MemCpyOptimizer.cpp G lib/Transforms/IPO/DeadArgumentElimination.cpp U lib/Transforms/IPO/ArgumentPromotion.cpp U lib/Transforms/InstCombine/InstCombineCompares.cpp U lib/Transforms/InstCombine/InstCombineAndOrXor.cpp U lib/Transforms/InstCombine/InstCombineCalls.cpp U lib/CodeGen/DwarfEHPrepare.cpp U lib/CodeGen/IntrinsicLowering.cpp U lib/Bitcode/Reader/BitcodeReader.cpp git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134949 91177308-0d34-0410-b5e6-96231b3b80d8
* De-constify Types in StructType::get() and TargetData::getIntPtrType().Jay Foad2011-07-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134893 91177308-0d34-0410-b5e6-96231b3b80d8