きつねさんより馬鹿だと自覚 LLVM/Clang++

きつねさん LLVM
https://researchmap.jp/jogxeqqfo-1797580/#_1797580

LLVMは、

```shell-session
$brew install --with-clang --with-lld --with-python --HEAD llvm
```

きつねさん　LLVM
http://kazegusuri.hateblo.jp/entry/20121215/1355564422

「きつねさんでもわかるLLVM」用の練習リポジトリ
https://github.com/NKMR6194/DummyC

ダウンロード。

```shell-session
$ make
$ mkdir -p ./obj
$ clang++ -g ./src/dcc.cpp -I./inc `llvm-config --cxxflags --
 ldflags --libs` -c -o ./obj/dcc.o
/bin/sh: llvm-config: command not found
./src/dcc.cpp:1:10: fatal error: 'llvm/IR/IRPrintingPasses.h' file not found
#include "llvm/IR/IRPrintingPasses.h"
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make: *** [obj/dcc.o] Error 1
```
---
え、見当たらないの？

```shell-session
$ ln -s /Users/administrator/llvm/include/llvm /Users/administrator/Downloads/DummyC-master/inc

$ make
$ mkdir -p ./obj
$ clang++ -g ./src/dcc.cpp -I./inc `llvm-config --cxxflags --ldflags --libs` -c -o ./obj/dcc.o
/bin/sh: llvm-config: command not found
In file included from ./src/dcc.cpp:1:
In file included from ./inc/./llvm/IR/IRPrintingPasses.h:22:
In file included from ./inc/llvm/ADT/StringRef.h:13:
In file included from ./inc/llvm/ADT/STLExtras.h:31:
In file included from ./inc/llvm/ADT/Optional.h:19:
./inc/llvm/ADT/None.h:23:6: warning: scoped enumerations are a C++11 extension
      [-Wc++11-extensions]
enum class NoneType { None = 1 };
     ^
./inc/llvm/ADT/None.h:24:23: warning: use of enumeration in a nested name
      specifier is a C++11 extension [-Wc++11-extensions]
const NoneType None = NoneType::None;
                      ^
In file included from ./src/dcc.cpp:1:
In file included from ./inc/./llvm/IR/IRPrintingPasses.h:22:
In file included from ./inc/llvm/ADT/StringRef.h:13:
In file included from ./inc/llvm/ADT/STLExtras.h:31:
In file included from ./inc/llvm/ADT/Optional.h:20:
In file included from ./inc/llvm/Support/AlignOf.h:17:
./inc/llvm/Support/Compiler.h:18:10: fatal error: 'llvm/Config/llvm-config.h'
      file not found
#include "llvm/Config/llvm-config.h"
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~
2 warnings and 1 error generated.
make: *** [obj/dcc.o] Error 1
```
llvm/Config/llvm-config.h.cmake
がファイル名。

```shell-session

$ cd llvm/Config
$ cp llvm-config.h.cmake llvm-config.c
$ make
$ mkdir -p ./obj
$ clang++ -g ./src/dcc.cpp -I./inc `llvm-config --cxxflags --ldflags --libs` -c -o ./obj/dcc.o
/bin/sh: llvm-config: command not found
In file included from ./src/dcc.cpp:1:
In file included from ./inc/./llvm/IR/IRPrintingPasses.h:22:
In file included from ./inc/llvm/ADT/StringRef.h:13:
In file included from ./inc/llvm/ADT/STLExtras.h:31:
In file included from ./inc/llvm/ADT/Optional.h:19:
./inc/llvm/ADT/None.h:23:6: warning: scoped enumerations are a C++11 extension
      [-Wc++11-extensions]
enum class NoneType { None = 1 };
     ^
./inc/llvm/ADT/None.h:24:23: warning: use of enumeration in a nested name
      specifier is a C++11 extension [-Wc++11-extensions]
const NoneType None = NoneType::None;
                      ^
In file included from ./src/dcc.cpp:1:
In file included from ./inc/./llvm/IR/IRPrintingPasses.h:22:
In file included from ./inc/llvm/ADT/StringRef.h:13:
In file included from ./inc/llvm/ADT/STLExtras.h:31:
In file included from ./inc/llvm/ADT/Optional.h:20:
In file included from ./inc/llvm/Support/AlignOf.h:17:
In file included from ./inc/llvm/Support/Compiler.h:18:
./inc/llvm/Config/llvm-config.h:18:2: error: invalid preprocessing directive
#cmakedefine LINK_POLLY_INTO_TOOLS
 ^
./inc/llvm/Config/llvm-config.h:21:2: error: invalid preprocessing directive
#cmakedefine LLVM_DEFAULT_TARGET_TRIPLE "${LLVM_DEFAULT_TARGET_TRIPLE}"
 ^
./inc/llvm/Config/llvm-config.h:24:2: error: invalid preprocessing directive
#cmakedefine01 LLVM_ENABLE_THREADS
 ^
./inc/llvm/Config/llvm-config.h:27:2: error: invalid preprocessing directive
#cmakedefine01 LLVM_HAS_ATOMICS
 ^
./inc/llvm/Config/llvm-config.h:30:2: error: invalid preprocessing directive
#cmakedefine LLVM_HOST_TRIPLE "${LLVM_HOST_TRIPLE}"
 ^
./inc/llvm/Config/llvm-config.h:33:2: error: invalid preprocessing directive
#cmakedefine LLVM_NATIVE_ARCH ${LLVM_NATIVE_ARCH}
 ^
./inc/llvm/Config/llvm-config.h:36:2: error: invalid preprocessing directive
#cmakedefine LLVM_NATIVE_ASMPARSER LLVMInitialize${LLVM_NATIVE_ARCH}AsmParser
 ^
./inc/llvm/Config/llvm-config.h:39:2: error: invalid preprocessing directive
#cmakedefine LLVM_NATIVE_ASMPRINTER LLVMInitialize${LLVM_NATIVE_ARCH}AsmPrinter
 ^
./inc/llvm/Config/llvm-config.h:42:2: error: invalid preprocessing directive
#cmakedefine LLVM_NATIVE_DISASSEMBLER LLVMInitialize${LLVM_NATIVE_ARCH}D...
 ^
./inc/llvm/Config/llvm-config.h:45:2: error: invalid preprocessing directive
#cmakedefine LLVM_NATIVE_TARGET LLVMInitialize${LLVM_NATIVE_ARCH}Target
 ^
./inc/llvm/Config/llvm-config.h:48:2: error: invalid preprocessing directive
#cmakedefine LLVM_NATIVE_TARGETINFO LLVMInitialize${LLVM_NATIVE_ARCH}TargetInfo
 ^
./inc/llvm/Config/llvm-config.h:51:2: error: invalid preprocessing directive
#cmakedefine LLVM_NATIVE_TARGETMC LLVMInitialize${LLVM_NATIVE_ARCH}TargetMC
 ^
./inc/llvm/Config/llvm-config.h:54:2: error: invalid preprocessing directive
#cmakedefine LLVM_ON_UNIX ${LLVM_ON_UNIX}
 ^
./inc/llvm/Config/llvm-config.h:57:2: error: invalid preprocessing directive
#cmakedefine LLVM_ON_WIN32 ${LLVM_ON_WIN32}
 ^
./inc/llvm/Config/llvm-config.h:60:2: error: invalid preprocessing directive
#cmakedefine01 LLVM_USE_INTEL_JITEVENTS
 ^
./inc/llvm/Config/llvm-config.h:63:2: error: invalid preprocessing directive
#cmakedefine01 LLVM_USE_OPROFILE
 ^
In file included from ./src/dcc.cpp:1:
In file included from ./inc/./llvm/IR/IRPrintingPasses.h:22:
In file included from ./inc/llvm/ADT/StringRef.h:13:
In file included from ./inc/llvm/ADT/STLExtras.h:31:
In file included from ./inc/llvm/ADT/Optional.h:20:
./inc/llvm/Support/AlignOf.h:113:19: warning: deleted function definitions are a
      C++11 extension [-Wc++11-extensions]
  AlignerImpl() = delete;
                  ^
./inc/llvm/Support/AlignOf.h:140:59: error: expected '(' for function-style cast
      or type construction
                                      T6, T7, T8, T9, T10>),
                                      ~~~~~~~~~~~~~~~~~~~~^
./inc/llvm/Support/AlignOf.h:142:61: error: expected class name
                                     T6, T7, T8, T9, T10>)> {
                                                            ^
In file included from ./src/dcc.cpp:1:
In file included from ./inc/./llvm/IR/IRPrintingPasses.h:22:
In file included from ./inc/llvm/ADT/StringRef.h:13:
In file included from ./inc/llvm/ADT/STLExtras.h:31:
In file included from ./inc/llvm/ADT/Optional.h:22:
./inc/llvm/Support/type_traits.h:53:32: error: a space is required between
      consecutive right angle brackets (use '> >')
struct isPodLike<std::pair<T, U>> {
                               ^~
                               > >
./inc/llvm/Support/type_traits.h:65:23: warning: alias declarations are a C++11
      extension [-Wc++11-extensions]
  using UnderlyingT = typename std::remove_reference<T>::type;
                      ^
./inc/llvm/Support/type_traits.h:78:59: warning: alias declarations are a C++11
      extension [-Wc++11-extensions]
struct add_lvalue_reference_if_not_pointer { using type = T &; };
                                                          ^
./inc/llvm/Support/type_traits.h:83:16: warning: alias declarations are a C++11
      extension [-Wc++11-extensions]
  using type = T;
               ^
./inc/llvm/Support/type_traits.h:89:46: warning: alias declarations are a C++11
      extension [-Wc++11-extensions]
struct add_const_past_pointer { using type = const T; };
                                             ^
./inc/llvm/Support/type_traits.h:94:16: warning: alias declarations are a C++11
      extension [-Wc++11-extensions]
  using type = const typename std::remove_pointer<T>::type *;
               ^
./inc/llvm/Support/type_traits.h:99:16: warning: alias declarations are a C++11
      extension [-Wc++11-extensions]
  using type = const T &;
               ^
./inc/llvm/Support/type_traits.h:104:16: warning: alias declarations are a C++11
      extension [-Wc++11-extensions]
  using type = typename add_const_past_pointer<T>::type;
               ^
In file included from ./src/dcc.cpp:1:
In file included from ./inc/./llvm/IR/IRPrintingPasses.h:22:
In file included from ./inc/llvm/ADT/StringRef.h:13:
In file included from ./inc/llvm/ADT/STLExtras.h:31:
./inc/llvm/ADT/Optional.h:33:15: warning: in-class initialization of non-static
      data member is a C++11 extension [-Wc++11-extensions]
  bool hasVal = false;
              ^
./inc/llvm/ADT/Optional.h:36:22: warning: alias declarations are a C++11
      extension [-Wc++11-extensions]
  using value_type = T;
                     ^
./inc/llvm/ADT/Optional.h:50:14: warning: rvalue references are a C++11
      extension [-Wc++11-extensions]
  Optional(T &&y) : hasVal(true) {
             ^
./inc/llvm/ADT/Optional.h:54:24: warning: rvalue references are a C++11
      extension [-Wc++11-extensions]
  Optional(Optional<T> &&O) : hasVal(O) {
                       ^
./inc/llvm/ADT/Optional.h:65:25: warning: rvalue references are a C++11
      extension [-Wc++11-extensions]
  Optional &operator=(T &&y) {
                        ^
./inc/llvm/ADT/Optional.h:75:32: warning: rvalue references are a C++11
      extension [-Wc++11-extensions]
  Optional &operator=(Optional &&O) {
                               ^
./inc/llvm/ADT/Optional.h:86:21: warning: variadic templates are a C++11
      extension [-Wc++11-extensions]
  template<typename ...ArgTypes>
                    ^
./inc/llvm/ADT/Optional.h:87:25: warning: rvalue references are a C++11
      extension [-Wc++11-extensions]
  void emplace(ArgTypes &&...Args) {
                        ^
./inc/llvm/ADT/Optional.h:132:3: warning: explicit conversion functions are a
      C++11 extension [-Wc++11-extensions]
  explicit operator bool() const { return hasVal; }
  ^~~~~~~~
fatal error: too many errors emitted, stopping now [-ferror-limit=]
19 warnings and 20 errors generated.
make: *** [obj/dcc.o] Error 1

/bin/sh: llvm-config: command not found
```
# 参考資料　
日本のプログラマが世界で戦える16分野。仮説(53),統計と確率(25)
https://qiita.com/kaizen_nagoya/items/a7e634a996cdd02bc53b
# 関連資料
' @kazuo_reve 私が効果を確認した「小川メソッド」
https://qiita.com/kazuo_reve/items/a3ea1d9171deeccc04da

' @kazuo_reve 新人の方によく展開している有益な情報
https://qiita.com/kazuo_reve/items/d1a3f0ee48e24bba38f1

' @kazuo_reve Vモデルについて勘違いしていたと思ったこと
https://qiita.com/kazuo_reve/items/46fddb094563bd9b2e1e
## 自己記事一覧
Qiitaで逆リンクを表示しなくなったような気がする。時々、スマフォで表示するとあらわっることがあり、完全に削除したのではなさそう。

４月以降、せっせとリンクリストを作り、統計を取って確率を説明しようとしている。
2025年２月末を目標にしている。

Qiitaの記事に３段階または５段階で到達するための方法
https://qiita.com/kaizen_nagoya/items/6e9298296852325adc5e

プログラマが知っていると良い「公序良俗」
https://qiita.com/kaizen_nagoya/items/9fe7c0dfac2fbd77a945

逆も真：社会人が最初に確かめるとよいこと。OSEK(69)、Ethernet(59)
https://qiita.com/kaizen_nagoya/items/39afe4a728a31b903ddc

「何を」よりも「誰を」。１０年後のために今見習いたい人たち
https://qiita.com/kaizen_nagoya/items/8045978b16eb49d572b2

物理記事　上位100
https://qiita.com/kaizen_nagoya/items/66e90fe31fbe3facc6ff

量子(0) 計算機, 量子力学 
https://qiita.com/kaizen_nagoya/items/1cd954cb0eed92879fd4

数学関連記事１００
https://qiita.com/kaizen_nagoya/items/d8dadb49a6397e854c6d

図(0) state, sequence and timing. UML and お絵描き 
https://qiita.com/kaizen_nagoya/items/60440a882146aeee9e8f

品質一覧 
https://qiita.com/kaizen_nagoya/items/2b99b8e9db6d94b2e971

言語・文学記事　１００
https://qiita.com/kaizen_nagoya/items/42d58d5ef7fb53c407d6

医工連携関連記事一覧
https://qiita.com/kaizen_nagoya/items/6ab51c12ba51bc260a82

自動車　記事　１００
https://qiita.com/kaizen_nagoya/items/f7f0b9ab36569ad409c5

通信記事１００
https://qiita.com/kaizen_nagoya/items/1d67de5e1cd207b05ef7

日本語（０）一欄
https://qiita.com/kaizen_nagoya/items/7498dcfa3a9ba7fd1e68

英語(0) 一覧
https://qiita.com/kaizen_nagoya/items/680e3f5cbf9430486c7d

転職(0)一覧
https://qiita.com/kaizen_nagoya/items/f77520d378d33451d6fe

仮説（0）一覧（目標100現在40）
https://qiita.com/kaizen_nagoya/items/f000506fe1837b3590df

音楽　一覧(0) 
https://qiita.com/kaizen_nagoya/items/b6e5f42bbfe3bbe40f5d

「@kazuo_reve 新人の方によく展開している有益な情報」確認一覧 
https://qiita.com/kaizen_nagoya/items/b9380888d1e5a042646b

Qiita(0)Qiita関連記事一覧（自分）
https://qiita.com/kaizen_nagoya/items/58db5fbf036b28e9dfa6

鉄道（０）鉄道のシステム考察はてっちゃんがてつだってくれる
https://qiita.com/kaizen_nagoya/items/26bda595f341a27901a0

安全（0）安全工学シンポジウムに向けて: 21
https://qiita.com/kaizen_nagoya/items/c5d78f3def8195cb2409

一覧の一覧( The directory of directories of mine.) Qiita(100)
https://qiita.com/kaizen_nagoya/items/7eb0e006543886138f39

Ethernet 記事一覧　Ethernet(0)
https://qiita.com/kaizen_nagoya/items/88d35e99f74aefc98794

Wireshark 一覧 wireshark(0)、Ethernet(48) 
https://qiita.com/kaizen_nagoya/items/fbed841f61875c4731d0

線網（Wi-Fi）空中線(antenna)(0) 記事一覧(118/300目標)
https://qiita.com/kaizen_nagoya/items/5e5464ac2b24bd4cd001

OSEK OS設計の基礎　OSEK(100)
https://qiita.com/kaizen_nagoya/items/7528a22a14242d2d58a3

Error一覧 error(0)
https://qiita.com/kaizen_nagoya/items/48b6cbc8d68eae2c42b8

C++ Support(0)　
https://qiita.com/kaizen_nagoya/items/8720d26f762369a80514

Coding(0) Rules, C, Secure, MISRA and so on
https://qiita.com/kaizen_nagoya/items/400725644a8a0e90fbb0

coding (101) 一覧を作成し始めた。omake:最近のQiitaで表示しない5つの事象
https://qiita.com/kaizen_nagoya/items/20667f09f19598aedb68

プログラマによる、プログラマのための、統計(0)と確率のプログラミングとその後
https://qiita.com/kaizen_nagoya/items/6e9897eb641268766909

なぜdockerで機械学習するか 書籍・ソース一覧作成中 (目標100)
https://qiita.com/kaizen_nagoya/items/ddd12477544bf5ba85e2

言語処理100本ノックをdockerで。python覚えるのに最適。:10+12
https://qiita.com/kaizen_nagoya/items/7e7eb7c543e0c18438c4

プログラムちょい替え（0）一覧:4件
https://qiita.com/kaizen_nagoya/items/296d87ef4bfd516bc394

Python(0)記事をまとめたい。
https://qiita.com/kaizen_nagoya/items/088c57d70ab6904ebb53

官公庁・学校・公的団体（NPOを含む）システムの課題、官（０）
https://qiita.com/kaizen_nagoya/items/04ee6eaf7ec13d3af4c3

「はじめての」シリーズ　 ベクタージャパン　
https://qiita.com/kaizen_nagoya/items/2e41634f6e21a3cf74eb

AUTOSAR(0)Qiita記事一覧, OSEK(75)
https://qiita.com/kaizen_nagoya/items/89c07961b59a8754c869

プログラマが知っていると良い「公序良俗」
https://qiita.com/kaizen_nagoya/items/9fe7c0dfac2fbd77a945

LaTeX(0) 一覧　
https://qiita.com/kaizen_nagoya/items/e3f7dafacab58c499792

自動制御、制御工学一覧（０）
https://qiita.com/kaizen_nagoya/items/7767a4e19a6ae1479e6b

Rust(0) 一覧　
https://qiita.com/kaizen_nagoya/items/5e8bb080ba6ca0281927

100以上いいねをいただいた記事16選
https://qiita.com/kaizen_nagoya/items/f8d958d9084ffbd15d2a

小川清最終講義、最終講義（再）計画, Ethernet(100) 英語(100) 安全(100)
https://qiita.com/kaizen_nagoya/items/e2df642e3951e35e6a53

＜この記事は個人の過去の経験に基づく個人の感想です。現在所属する組織、業務とは関係がありません。＞
This article is an individual impression based on the individual's experience. It has nothing to do with the organization or business to which I currently belong.
### 文書履歴(document history)
ver. 0.01 初稿 　20180322
ver. 0.02 ありがとう追記　20230513
## 最後までおよみいただきありがとうございました。
いいね　💚、フォローをお願いします。
####  Thank you very much for reading to the last sentence.
Please press the like icon 💚　and follow me for your happy life.