error: no member named 'MaybeAlign'in namespace 'llvm' return context.builder.CreateAlignedStore(val, ptr, llvm::MaybeAlign(4)); ~~~~~~^ error: no member named 'MaybeAlign'in namespace 'llvm' return context.builder.CreateAlignedLoad(ptr, llvm::MaybeAlign(4));
解决过程:
使用brew info llvm查看 llvm 版本(brew install llvm安装)
1
llvm: stable 12.0.0 (bottled), HEAD [keg-only]
发现是keg-only的版本(我也不知道这是什么),但是 brew 提示了我
1 2 3 4 5 6
If you need to have llvm first in your PATH, run: echo'export PATH="/usr/local/opt/llvm/bin:$PATH"' >> ~/.zshrc
For compilers to find llvm you may need to set: export LDFLAGS="-L/usr/local/opt/llvm/lib" export CPPFLAGS="-I/usr/local/opt/llvm/include"