[compiler-rt] r324136 - Use NULL instead of nullptr in invalid-pointer-pairs-compare-null.cc; nullptr is not available on older Darwin systems.
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 5 10:29:48 PST 2018
I'm a bit confused - aren't these tests built using the just-built
compiler? What's the scenario they're being run under that requires
backwards compatibility like that?
On Fri, Feb 2, 2018 at 12:44 PM Kuba Mracek via llvm-commits <
llvm-commits at lists.llvm.org> wrote:
> Author: kuba.brecka
> Date: Fri Feb 2 12:42:29 2018
> New Revision: 324136
>
> URL: http://llvm.org/viewvc/llvm-project?rev=324136&view=rev
> Log:
> Use NULL instead of nullptr in invalid-pointer-pairs-compare-null.cc;
> nullptr is not available on older Darwin systems.
>
>
> Modified:
>
> compiler-rt/trunk/test/asan/TestCases/invalid-pointer-pairs-compare-null.cc
>
> Modified:
> compiler-rt/trunk/test/asan/TestCases/invalid-pointer-pairs-compare-null.cc
> URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/TestCases/invalid-pointer-pairs-compare-null.cc?rev=324136&r1=324135&r2=324136&view=diff
>
> ==============================================================================
> ---
> compiler-rt/trunk/test/asan/TestCases/invalid-pointer-pairs-compare-null.cc
> (original)
> +++
> compiler-rt/trunk/test/asan/TestCases/invalid-pointer-pairs-compare-null.cc
> Fri Feb 2 12:42:29 2018
> @@ -15,28 +15,28 @@ char small_global[7] = {};
> int main() {
> // Heap allocated memory.
> char *p = (char *)malloc(42);
> - int r = foo(p, nullptr);
> + int r = foo(p, NULL);
> free(p);
>
> p = (char *)malloc(1024);
> - foo(nullptr, p);
> + foo(NULL, p);
> free(p);
>
> p = (char *)malloc(4096);
> - foo(p, nullptr);
> + foo(p, NULL);
> free(p);
>
> // Global variable.
> - foo(&global[0], nullptr);
> - foo(&global[1000], nullptr);
> + foo(&global[0], NULL);
> + foo(&global[1000], NULL);
>
> p = &small_global[0];
> - foo(p, nullptr);
> + foo(p, NULL);
>
> // Stack variable.
> char stack[10000];
> - foo(&stack[0], nullptr);
> - foo(nullptr, &stack[9000]);
> + foo(&stack[0], NULL);
> + foo(NULL, &stack[9000]);
>
> return 0;
> }
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180205/220d5fb1/attachment.html>
More information about the llvm-commits
mailing list