Avoid undefined behavior in the x86 lzcnt header file by explicitly checking for 0 before calling __builtin_clz. Without this the optimizers may take advantage of the undefined behavior and produce incorrect results. LLVM itself still needs to be taught to merge the zero check into the llvm.ctlz with defined zero behavior.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221064 91177308-0d34-0410-b5e6-96231b3b80d8
Avoid undefined behavior in the x86 bmi header file by explicitly checking for 0 before calling __builtin_ctz. Without this the optimizers may take advantage of the undefined behavior and produce incorrect results. LLVM itself still needs to be taught to merge the zero check into the llvm.cttz with defined zero behavior.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221065 91177308-0d34-0410-b5e6-96231b3b80d8
Add _lzcnt_u32 and _lzcnt_u64 to lzcntintrin.h to match Intel documentation names for these intrinsics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221066 91177308-0d34-0410-b5e6-96231b3b80d8
[PowerPC] Change PPCTargetInfo::hasFeature() to use StringSwitch

Implement post-commit comment on r220989 from Eric Christopher.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221099 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: [Java] Don't break after extends/implements.

Before:
  abstract class SomeClass extends SomeOtherClass implements
      SomeInterface {}

After:
  abstract class SomeClass extends SomeOtherClass
      implements SomeInterface {}

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221103 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: [Java] Support try/catch/finally blocks.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221104 91177308-0d34-0410-b5e6-96231b3b80d8
docs: remove double carriage-return

The double carriage return would silence a warning due to a missing
.clang-format.  Permit the error to bubble through.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221107 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: permit setting the path to clang in vimrc

If g:clang_format_path is set in the vimrc, that path will take precedence over
the hard coded path (which is reliant on the PATH environment variable).  This
provides an easy mechanism for switching the selected clang-format binary during
development.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221108 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: [Java] Support generics with "?".

Before:
  @Override
  public Map < String,
          ? > getAll() {
    // ...
  }

After:
  @Override
  public Map<String, ?> getAll() {
    // ...
  }

This fixes llvm.org/PR21454.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221109 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: [Java] Add space between "synchronized" and "(".

Before:
  synchronized(mData) {
    // ...
  }

After:
  synchronized (mData) {
    // ...
  }

This fixes llvm.org/PR21455.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221110 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: [Java] Don't break imports.

This fixes llvm.org/PR21453.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221112 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: [Java] Support enums without trailing semicolon.

Before:
  class SomeClass {
    enum SomeThing { ABC, CDE } void f() {
    }
  }

After:
  class SomeClass {
    enum SomeThing { ABC, CDE }
    void f() {
    }
  }

This fixed llvm.org/PR21458.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221113 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: Fix false positive in lambda detection.

Before:
  delete [] a -> b;

After:
  delete[] a->b;

This fixes part of llvm.org/PR21419.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221114 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: [Java] Fix class declaration formatting.

Before:
  @SomeAnnotation()
  abstract
      class aaaaaaaaaaaa extends bbbbbbbbbbbbbbb implements cccccccccccc {
  }

After:
  @SomeAnnotation()
  abstract class aaaaaaaaaaaa extends bbbbbbbbbbbbbbb
      implements cccccccccccc {
  }

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221121 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: [Java] Fix static generic methods.

Before:
  public static<R> ArrayList<R> get() {}

After:
  public static <R> ArrayList<R> get() {}

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221122 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: [Java] Fix more generics formatting.

Before:
  < T extends B > T getInstance(Class<T> type);

After:
  <T extends B> T getInstance(Class<T> type);

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221124 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: [Java] Allow trailing semicolons after enums.

Before:
  enum SomeThing { ABC, CDE }
  ;

After:
  enum SomeThing { ABC, CDE };

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221125 91177308-0d34-0410-b5e6-96231b3b80d8
Remove definitions from Intrin.h that already exist in one of the other x86 intrinsic headers. Add a run line with Broadwell as the cpu type to ms-intrin.cpp test to catch some of these in the future.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221127 91177308-0d34-0410-b5e6-96231b3b80d8
Add FSGSBASE intrinsics to x86 intrinsic headers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221130 91177308-0d34-0410-b5e6-96231b3b80d8
[x86] Realphabetize the feature string decoding function since it was mostly in alphabetical order.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221131 91177308-0d34-0410-b5e6-96231b3b80d8