SuccessChanges

Summary

  1. Turn on -Wmicrosoft-enum-forward-reference by default. clang-cl already errs or warns on everything that cl warns on in /permissive- mode, except for enum foward declarations (and ATL attributes). So warn on enum forward declarations by default.
  2. [InstSimplify] add folds for or-of-casted-icmps The sibling folds for 'and' with casts were added with https://reviews.llvm.org/rL273200. This is a preliminary step for adding the 'or' variants for the folds added with https://reviews.llvm.org/rL301260. The reason for the strange form with constant LHS in the 1st test is because there's another missing fold in that case for the inverted predicate. That should be fixed when we add the ConstantRange functionality for 'or-of-icmps' that already exists for 'and-of-icmps'. I'm hoping to share more code for the and/or cases, so we won't have these differences. This will allow us to remove code from InstCombine. It's also possible that we can remove some code here in InstSimplify. I think we have some duplicated folds because patterns are not matched in a general way. Differential Revision: https://reviews.llvm.org/D32876
  3. Fix bugs checking va_start in lambdas and erroneous contexts Summary: First, getCurFunction looks through blocks and lambdas, which is wrong. Inside a lambda, va_start should refer to the lambda call operator prototype. This fixes PR32737. Second, we shouldn't use any of the getCur* methods, because they look through contexts that we don't want to look through (EnumDecl, CapturedStmtDecl). We can use CurContext directly as the calling context. Finally, this code assumed that CallExprs would never appear outside of code contexts (block, function, obj-c method), which is wrong. Struct member initializers are an easy way to create and parse exprs in a non-code context. Reviewers: rsmith Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D32761
  4. Turn -Wmicrosoft-enum-value off by default. The warning is currently way too noisy to be useful. The plan is to make it warn when an MS enum that's negative is compared to something, but until that's done the warning shouldn't default to on.
  5. Simplify the header allocation. In the non linker script case we would try very early to find out if we could allocate the headers. Failing to do that would add extra alignment to the first ro section, since we would set PageAlign thinking it was the first section in the PT_LOAD. In the linker script case the header allocation must be done in the end, causing some duplication. We now tentatively add the headers to the first PT_LOAD and if it turns out they don't fit, remove them. With this we only need to allocate the headers in one place in the code.
  6. [WebAssembly] Add wasm symbol table support to llvm-objdump Differential Revision: https://reviews.llvm.org/D32760
Revision 302190 by nico:
Turn on -Wmicrosoft-enum-forward-reference by default.

clang-cl already errs or warns on everything that cl
warns on in /permissive- mode, except for enum foward
declarations (and ATL attributes).
So warn on enum forward declarations by default.
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td (diff)llvm-revision.src/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
Revision 302189 by spatel:
[InstSimplify] add folds for or-of-casted-icmps

The sibling folds for 'and' with casts were added with https://reviews.llvm.org/rL273200.
This is a preliminary step for adding the 'or' variants for the folds added with https://reviews.llvm.org/rL301260.

The reason for the strange form with constant LHS in the 1st test is because there's another missing fold in that
case for the inverted predicate. That should be fixed when we add the ConstantRange functionality for 'or-of-icmps'
that already exists for 'and-of-icmps'.

I'm hoping to share more code for the and/or cases, so we won't have these differences. This will allow us to remove
code from InstCombine. It's also possible that we can remove some code here in InstSimplify. I think we have some
duplicated folds because patterns are not matched in a general way.

Differential Revision: https://reviews.llvm.org/D32876
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/lib/Analysis/InstructionSimplify.cpp (diff)llvm-revision.src/llvm/trunk/lib/Analysis/InstructionSimplify.cpp
The file was modified/llvm/trunk/test/Transforms/InstSimplify/AndOrXor.ll (diff)llvm-revision.src/llvm/trunk/test/Transforms/InstSimplify/AndOrXor.ll
Revision 302188 by rnk:
Fix bugs checking va_start in lambdas and erroneous contexts

Summary:
First, getCurFunction looks through blocks and lambdas, which is wrong.
Inside a lambda, va_start should refer to the lambda call operator
prototype. This fixes PR32737.

Second, we shouldn't use any of the getCur* methods, because they look
through contexts that we don't want to look through (EnumDecl,
CapturedStmtDecl). We can use CurContext directly as the calling
context.

Finally, this code assumed that CallExprs would never appear outside of
code contexts (block, function, obj-c method), which is wrong. Struct
member initializers are an easy way to create and parse exprs in a
non-code context.

Reviewers: rsmith

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D32761
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td (diff)llvm-revision.src/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
The file was modified/cfe/trunk/lib/Sema/SemaChecking.cpp (diff)llvm-revision.src/cfe/trunk/lib/Sema/SemaChecking.cpp
The file was added/cfe/trunk/test/OpenMP/varargs.cppllvm-revision.src/cfe/trunk/test/OpenMP/varargs.cpp
The file was modified/cfe/trunk/test/SemaCXX/varargs.cpp (diff)llvm-revision.src/cfe/trunk/test/SemaCXX/varargs.cpp
Revision 302187 by nico:
Turn -Wmicrosoft-enum-value off by default.

The warning is currently way too noisy to be useful. The plan is
to make it warn when an MS enum that's negative is compared to
something, but until that's done the warning shouldn't default
to on.
Change TypePath in RepositoryPath in Workspace
The file was modified/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td (diff)llvm-revision.src/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
Revision 302186 by rafael:
Simplify the header allocation.

In the non linker script case we would try very early to find out if
we could allocate the headers. Failing to do that would add extra
alignment to the first ro section, since we would set PageAlign
thinking it was the first section in the PT_LOAD.

In the linker script case the header allocation must be done in the
end, causing some duplication.

We now tentatively add the headers to the first PT_LOAD and if it
turns out they don't fit, remove them. With this we only need to
allocate the headers in one place in the code.
Change TypePath in RepositoryPath in Workspace
The file was modified/lld/trunk/ELF/LinkerScript.cpp (diff)llvm-revision.src/lld/trunk/ELF/LinkerScript.cpp
The file was modified/lld/trunk/ELF/LinkerScript.h (diff)llvm-revision.src/lld/trunk/ELF/LinkerScript.h
The file was modified/lld/trunk/ELF/Writer.cpp (diff)llvm-revision.src/lld/trunk/ELF/Writer.cpp
The file was modified/lld/trunk/ELF/Writer.h (diff)llvm-revision.src/lld/trunk/ELF/Writer.h
Revision 302185 by sbc:
[WebAssembly] Add wasm symbol table support to llvm-objdump

Differential Revision: https://reviews.llvm.org/D32760
Change TypePath in RepositoryPath in Workspace
The file was modified/llvm/trunk/include/llvm/Object/Wasm.h (diff)llvm-revision.src/llvm/trunk/include/llvm/Object/Wasm.h
The file was modified/llvm/trunk/lib/Object/WasmObjectFile.cpp (diff)llvm-revision.src/llvm/trunk/lib/Object/WasmObjectFile.cpp
The file was added/llvm/trunk/test/tools/llvm-objdump/WebAssemblyllvm-revision.src/llvm/trunk/test/tools/llvm-objdump/WebAssembly
The file was added/llvm/trunk/test/tools/llvm-objdump/WebAssembly/symbol-table.testllvm-revision.src/llvm/trunk/test/tools/llvm-objdump/WebAssembly/symbol-table.test