- Nov 19, 2014
-
-
Peter Collingbourne authored
to make use of it. llvm-svn: 222307
-
David Blaikie authored
llvm-svn: 222306
-
David Blaikie authored
llvm-svn: 222305
-
David Blaikie authored
llvm-svn: 222304
-
David Blaikie authored
llvm-svn: 222303
-
David Blaikie authored
StringSet is still a bit dodgy in that it exposes the raw iterator of the StringMap parent, which exposes the weird detail that StringSet actually has a 'value'... but anyway, this is useful for a handful of clients that want to reference the newly inserted/persistent string data in the StringSet/Map/Entry/thing. llvm-svn: 222302
-
Jason Molenda authored
where it is retrieving the Return Address register contents on a target where that's a thing. If we fail to get a valid RA, we force a switch to the fallback unwind plan. This patch adds a sanity check for that fallback unwind plan -- it must get a valid CFA for this frame in addition to being able to retrieve the caller's PC -- and it correctly marks the unwind rules as failing if the fallback unwind plan fails. <rdar://problem/19010211> llvm-svn: 222301
-
Nick Kledzik authored
Mach-o does not use a simple SO_NEEDED to track dependent dylibs. Instead, the linker copies four things from each dylib to each client: the runtime path (aka "install name"), the build time, current version (dylib build number), and compatibility version The build time is no longer used (it cause every rebuild of a dylib to be different). The compatibility version is usually just 1.0 and never changes, or the dylib becomes incompatible. This patch copies that information into the NormalizedMachO format and propagates it to clients. llvm-svn: 222300
-
Rui Ueyama authored
It printed out base relocation table header as table entry. This patch also makes llvm-readobj to not skip ABSOLUTE entries becuase it was confusing. llvm-svn: 222299
-
Eric Fiselier authored
Wrap the original test in _LIBCPP_HAS_QUICK_EXIT so it only runs when we have quick_exit and add two new tests that check that when _LIBCPP_HAS_QUICK_EXIT is not defined then no definition of std::at_quick_exit or std::quick_exit are available. llvm-svn: 222298
-
Kuba Brecka authored
Reviewed at http://reviews.llvm.org/D6238 ASan on Darwin during launch reads DYLD_INSERT_LIBRARIES env. variable and if it's not set or if the ASan dylib is not present in there, it relaunches the process. The check whether the dylib is present in the variable is now trying to find a full path in there. This fails in the scenarios where we want to copy the dylib to the executable's directory or somewhere else and set the DYLD_INSERT_LIBRARIES manually, see http://reviews.llvm.org/D6018. Let's change the search in DYLD_INSERT_LIBRARIES to only look for the filename of the dylib and not the full path. llvm-svn: 222297
-
Eric Fiselier authored
diff --git a/test/language.support/support.types/nullptr_t.pass.cpp b/test/language.support/support.types/nullptr_t.pass.cpp index 6c15fef..4d7c8b0 100644 --- a/test/language.support/support.types/nullptr_t.pass.cpp +++ b/test/language.support/support.types/nullptr_t.pass.cpp @@ -18,42 +18,62 @@ struct A A(std::nullptr_t) {} }; +template <class T> +void test_conversions() +{ + { + T p = 0; + assert(p == nullptr); + } + { + T p = nullptr; + assert(p == nullptr); + assert(nullptr == p); + assert(!(p != nullptr)); + assert(!(nullptr != p)); + } +} + +template <class T> +void test_comparisons() +{ + T p = nullptr; + assert(p == nullptr); + assert(p <= nullptr); + assert(p >= nullptr); + assert(!(p != nullptr)); + assert(!(p < nullptr)); + assert(!(p > nullptr)); + assert(nullptr == p); + assert(nullptr <= p); + assert(nullptr >= p); + assert(!(nullptr != p)); + assert(!(nullptr < p)); + assert(!(nullptr > p)); +} + + int main() { static_assert(sizeof(std::nullptr_t) == sizeof(void*), "sizeof(std::nullptr_t) == sizeof(void*)"); - A* p = 0; - assert(p == nullptr); - void (A::*pmf)() = 0; -#ifdef __clang__ - // GCC 4.2 can't handle this - assert(pmf == nullptr); -#endif - int A::*pmd = 0; - assert(pmd == nullptr); - A a1(nullptr); - A a2(0); - bool b = nullptr; - assert(!b); - assert(nullptr == nullptr); - assert(nullptr <= nullptr); - assert(nullptr >= nullptr); - assert(!(nullptr != nullptr)); - assert(!(nullptr < nullptr)); - assert(!(nullptr > nullptr)); - A* a = nullptr; - assert(a == nullptr); - assert(a <= nullptr); - assert(a >= nullptr); - assert(!(a != nullptr)); - assert(!(a < nullptr)); - assert(!(a > nullptr)); - assert(nullptr == a); - assert(nullptr <= a); - assert(nullptr >= a); - assert(!(nullptr != a)); - assert(!(nullptr < a)); - assert(!(nullptr > a)); - std::ptrdiff_t i = reinterpret_cast<std::ptrdiff_t>(nullptr); - assert(i == 0); + + { + test_conversions<std::nullptr_t>(); + test_conversions<void*>(); + test_conversions<A*>(); + test_conversions<void(*)()>(); + test_conversions<void(A::*)()>(); + test_conversions<int A::*>(); + } + { + test_comparisons<std::nullptr_t>(); + test_comparisons<void*>(); + test_comparisons<A*>(); + test_comparisons<void(*)()>(); + } + { + bool b = nullptr; + assert(!b); + } } diff --git a/test/language.support/support.types/nullptr_t_integral_cast.fail.cpp b/test/language.support/support.types/nullptr_t_integral_cast.fail.cpp new file mode 100644 index 0000000..92bd879 --- /dev/null +++ b/test/language.support/support.types/nullptr_t_integral_cast.fail.cpp @@ -0,0 +1,17 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// typedef decltype(nullptr) nullptr_t; + +#include <cstddef> + +int main() +{ + std::ptrdiff_t i = static_cast<std::ptrdiff_t>(nullptr); +} diff --git a/test/language.support/support.types/nullptr_t_integral_cast.pass.cpp b/test/language.support/support.types/nullptr_t_integral_cast.pass.cpp new file mode 100644 index 0000000..34c7a93 --- /dev/null +++ b/test/language.support/support.types/nullptr_t_integral_cast.pass.cpp @@ -0,0 +1,24 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// NOTE: nullptr_t emulation cannot handle a reinterpret_cast to an +// integral type +// XFAIL: c++98, c++03 + +// typedef decltype(nullptr) nullptr_t; + + +#include <cstddef> +#include <cassert> + +int main() +{ + std::ptrdiff_t i = reinterpret_cast<std::ptrdiff_t>(nullptr); + assert(i == 0); +} llvm-svn: 222296
-
Jim Ingham authored
some commands that will get run if the target crashes. Also fix the bug where the local .lldbinit file was not getting sourced before not after the target was created from the file options on the driver command line. <rdar://problem/19019843> llvm-svn: 222295
-
Rafael Espindola authored
The other option would be to do something like if (that.isSingleWord()) VAL = that.VAL; else pVal = that.pVal This bug was causing 86TTI::getIntImmCost to be miscompiled in a LTO bootstrap in stage2, causing the build of stage3 to fail. LLVM is getting quiet good at exploiting this. Not sure if there is anything a sanitizer could do to help llvm-svn: 222294
-
Rui Ueyama authored
This patch fixes the following MSVC warning. warning C4334: '<<' : result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?) llvm-svn: 222293
-
Weiming Zhao authored
llvm-svn: 222292
-
Kostya Serebryany authored
[asan] initial support for experimental basic-block tracing; also add tests for various levels of -fsanitize-coverage llvm-svn: 222291
-
Kostya Serebryany authored
[asan] add experimental basic-block tracing to asan-coverage; also fix -fsanitize-coverage=3 which was broken by r221718 llvm-svn: 222290
-
Rui Ueyama authored
llvm-svn: 222289
-
Kostya Serebryany authored
Summary: move the code from BreakCriticalEdges::runOnFunction() into a separate utility function llvm::SplitAllCriticalEdges() so that it can be used independently. No functionality change intended. Test Plan: check-llvm Reviewers: nlewycky Reviewed By: nlewycky Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D6313 llvm-svn: 222288
-
Manman Ren authored
http://lab.llvm.org:8080/green/job/clang-Rlto_master/298/ Hopefully, bot will be green. If not, we will re-submit the commit. llvm-svn: 222287
-
Matt Arsenault authored
This partially makes up for not having address spaces used for alias analysis in some simple cases. This is not yet enabled by default so shouldn't change anything yet. llvm-svn: 222286
-
Matt Arsenault authored
Assuming unmodeled side effects interferes with some scheduling opportunities. Don't put it in the base class of DS instructions since there are a few weird effecting, non load/store instructions there. llvm-svn: 222285
-
Daniel Jasper authored
Before: SomeFunction(parameter, parameter); After: SomeFunction(parameter, parameter); Patch by Harry Terkelsen, thank you! llvm-svn: 222284
-
Daniel Jasper authored
bracket Before: public Foo<X, Y> [] foos; After: public Foo<X, Y>[] foos; Patch by Harry Terkelsen. Thank you! llvm-svn: 222283
-
Eric Fiselier authored
llvm-svn: 222282
-
Simon Pilgrim authored
Under many circumstances the stack is not 32-byte aligned, resulting in the use of the vmovups/vmovupd/vmovdqu instructions when inserting ymm reloads/spills. This minor patch adds these instructions to the isFrameLoadOpcode/isFrameStoreOpcode helpers so that they can be correctly identified and not be treated as folded reloads/spills. This has also been noticed by http://llvm.org/bugs/show_bug.cgi?id=18846 where it was causing redundant spills - I've added a reduced test case at test/CodeGen/X86/pr18846.ll Differential Revision: http://reviews.llvm.org/D6252 llvm-svn: 222281
-
Enrico Granata authored
Shuffle APIs around a little bit, so that if you pass custom summary options, we don't end up caching the summary hence obtained. You may want to obtain an uncapped summary, but this should not be reflected in the summary we cache. The drawback is that we don't cache as aggressively as we could, but at least you get to have different summaries with different options without having to reset formatters or the SBValue at each step llvm-svn: 222280
-
Justin Bogner authored
Change these tests not to rely on the exact metadata numbers the profile data gets. llvm-svn: 222279
-
Eric Fiselier authored
llvm-svn: 222278
-
- Nov 18, 2014
-
-
Enrico Granata authored
llvm-svn: 222277
-
Enrico Granata authored
llvm-svn: 222276
-
Ismail Pazarbasi authored
This reverts commit aa8d370ee798f75bc05a1ae9a240bc3e5b6870ac. llvm-svn: 222275
-
Colin LeMahieu authored
llvm-svn: 222274
-
Ismail Pazarbasi authored
llvm-svn: 222273
-
Chad Rosier authored
shift-right for booleans (i1). Arithmetic shift-right immediate with sign-/zero-extensions also works for boolean values. Update the assert and the test cases to reflect that fact. llvm-svn: 222272
-
Eric Christopher authored
llvm-svn: 222271
-
Chad Rosier authored
shift-right for booleans (i1). Logical shift-right immediate with sign-/zero-extensions also works for boolean values. Update the assert and the test cases to reflect that fact. llvm-svn: 222270
-
Eric Christopher authored
llvm-svn: 222269
-
Eric Christopher authored
llvm-svn: 222268
-