How to build the latest clang-tidy?

Up-to-date steps: git clone https://github.com/llvm/llvm-project.git cd llvm-project mkdir build cd build cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLLVM_ENABLE_PROJECTS=”clang;clang-tools-extra” ../llvm make install clang-tidy Reference, ninja, and other details: my own blog post.

When choosing a functional programming language for use with LLVM, what are the trade-offs?

Either OCaml or Haskell would be a good choice. Why not check out the LLVM tutorials for each language? The LLVM tutorial for OCaml is here: http://llvm.org/docs/tutorial/OCamlLangImpl1.html Haskell has more momentum these days, but there are plenty of good parsing libraries for OCaml as well including the PEG parser generator Aurochs, Menhir, and the GLR … Read more

LLVM get constant integer back from Value*

Eli’s answer is great, but it’s missing the final part, which is getting the integer back. The full picture should look like this: if (ConstantInt* CI = dyn_cast<ConstantInt>(Val)) { if (CI->getBitWidth() <= 32) { constIntValue = CI->getSExtValue(); } } Of course, you can also change it to <= 64 if constIntValue is a 64-bit integer, … Read more

Compile Swift to WebAssembly

1) To the best of my knowledge as of early Nov, 2017 you are correct: there is no commonly available way to compile Swift to WebAssembly. Maybe some enterprising hacker somewhere has made it happen but if so she hasn’t shared her code with us yet. 2) In order to enable Wasm support you will … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)