Created
January 4, 2023 10:11
-
-
Save eternaleclipse/cbe212d588ffb6254b2d77087120ac07 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ 50%] Building CXX object skeleton/CMakeFiles/SkeletonPass.dir/Skeleton.cpp.o | |
In file included from /usr/local/include/llvm/ADT/ArrayRef.h:12, | |
from /usr/local/include/llvm/ADT/STLExtras.h:20, | |
from /usr/local/include/llvm/PassAnalysisSupport.h:25, | |
from /usr/local/include/llvm/Pass.h:347, | |
from /home/user/llvm-pass-tutorial/skeleton/Skeleton.cpp:1: | |
/usr/local/include/llvm/ADT/Hashing.h:127:55: error: ‘optional’ in namespace ‘std’ does not name a template type | |
127 | template <typename T> hash_code hash_value(const std::optional<T> &arg); | |
| ^~~~~~~~ | |
/usr/local/include/llvm/ADT/Hashing.h:127:50: note: ‘std::optional’ is only available from C++17 onwards | |
127 | template <typename T> hash_code hash_value(const std::optional<T> &arg); | |
| ^~~ | |
/usr/local/include/llvm/ADT/Hashing.h:127:63: error: expected ‘,’ or ‘...’ before ‘<’ token | |
127 | template <typename T> hash_code hash_value(const std::optional<T> &arg); | |
| ^ | |
/usr/local/include/llvm/ADT/Hashing.h: In function ‘llvm::hash_code llvm::hash_value(const std::tuple<_Tps ...>&)’: | |
/usr/local/include/llvm/ADT/Hashing.h:658:15: error: ‘apply’ is not a member of ‘std’ | |
658 | return std::apply([](const auto &...xs) { return hash_combine(xs...); }, arg); | |
| ^~~~~ | |
/usr/local/include/llvm/ADT/Hashing.h: At global scope: | |
/usr/local/include/llvm/ADT/Hashing.h:668:55: error: ‘optional’ in namespace ‘std’ does not name a template type | |
668 | template <typename T> hash_code hash_value(const std::optional<T> &arg) { | |
| ^~~~~~~~ | |
/usr/local/include/llvm/ADT/Hashing.h:668:50: note: ‘std::optional’ is only available from C++17 onwards | |
668 | template <typename T> hash_code hash_value(const std::optional<T> &arg) { | |
| ^~~ | |
/usr/local/include/llvm/ADT/Hashing.h:668:63: error: expected ‘,’ or ‘...’ before ‘<’ token | |
668 | template <typename T> hash_code hash_value(const std::optional<T> &arg) { | |
| ^ | |
/usr/local/include/llvm/ADT/Hashing.h: In function ‘llvm::hash_code llvm::hash_value(int)’: | |
/usr/local/include/llvm/ADT/Hashing.h:669:10: error: ‘arg’ was not declared in this scope | |
669 | return arg ? hash_combine(true, *arg) : hash_value(false); | |
| ^~~ | |
In file included from /usr/local/include/llvm/ADT/ArrayRef.h:13, | |
from /usr/local/include/llvm/ADT/STLExtras.h:20, | |
from /usr/local/include/llvm/PassAnalysisSupport.h:25, | |
from /usr/local/include/llvm/Pass.h:347, | |
from /home/user/llvm-pass-tutorial/skeleton/Skeleton.cpp:1: | |
/usr/local/include/llvm/ADT/SmallVector.h: In static member function ‘static void llvm::SmallVectorTemplateBase<T, <anonymous> >::uninitialized_move(It1, It1, It2)’: | |
/usr/local/include/llvm/ADT/SmallVector.h:352:10: error: ‘uninitialized_move’ is not a member of ‘std’; did you mean ‘uninitialized_copy’? | |
352 | std::uninitialized_move(I, E, Dest); | |
| ^~~~~~~~~~~~~~~~~~ | |
| uninitialized_copy | |
In file included from /usr/local/include/llvm/ADT/STLExtras.h:20, | |
from /usr/local/include/llvm/PassAnalysisSupport.h:25, | |
from /usr/local/include/llvm/Pass.h:347, | |
from /home/user/llvm-pass-tutorial/skeleton/Skeleton.cpp:1: | |
/usr/local/include/llvm/ADT/ArrayRef.h: At global scope: | |
/usr/local/include/llvm/ADT/ArrayRef.h:70:44: error: invalid use of ‘::’ | |
70 | /*implicit*/ ArrayRef(std::nullopt_t) {} | |
| ^ | |
/usr/local/include/llvm/ADT/ArrayRef.h:70:44: error: expected ‘;’ at end of member declaration | |
70 | /*implicit*/ ArrayRef(std::nullopt_t) {} | |
| ^ | |
| ; | |
/usr/local/include/llvm/ADT/ArrayRef.h:323:48: error: function definition does not declare parameters | |
323 | /*implicit*/ MutableArrayRef(std::nullopt_t) : ArrayRef<T>() {} | |
| ^ | |
In file included from /usr/local/include/llvm/ADT/STLForwardCompat.h:20, | |
from /usr/local/include/llvm/ADT/STLExtras.h:21, | |
from /usr/local/include/llvm/PassAnalysisSupport.h:25, | |
from /usr/local/include/llvm/Pass.h:347, | |
from /home/user/llvm-pass-tutorial/skeleton/Skeleton.cpp:1: | |
/usr/local/include/llvm/ADT/Optional.h:80:53: error: expected ‘)’ before ‘,’ token | |
80 | constexpr explicit OptionalStorage(std::in_place_t, Args &&...args) | |
| ~ ^ | |
| ) | |
/usr/local/include/llvm/ADT/Optional.h:178:53: error: expected ‘)’ before ‘,’ token | |
178 | constexpr explicit OptionalStorage(std::in_place_t, Args &&...args) | |
| ~ ^ | |
| ) | |
/usr/local/include/llvm/ADT/Optional.h:238:39: error: invalid use of ‘::’ | |
238 | constexpr Optional(std::nullopt_t) {} | |
| ^ | |
/usr/local/include/llvm/ADT/Optional.h:238:39: error: expected ‘;’ at end of member declaration | |
238 | constexpr Optional(std::nullopt_t) {} | |
| ^ | |
| ; | |
/usr/local/include/llvm/ADT/Optional.h:247:37: error: expected ‘)’ before ‘,’ token | |
247 | constexpr Optional(std::in_place_t, ArgTypes &&...Args) | |
| ~ ^ | |
| ) | |
/usr/local/include/llvm/ADT/Optional.h: In constructor ‘constexpr llvm::Optional<T>::Optional(const T&)’: | |
/usr/local/include/llvm/ADT/Optional.h:240:49: error: ‘in_place’ is not a member of ‘std’ | |
240 | constexpr Optional(const T &y) : Storage(std::in_place, y) {} | |
| ^~~~~~~~ | |
/usr/local/include/llvm/ADT/Optional.h: In constructor ‘constexpr llvm::Optional<T>::Optional(T&&)’: | |
/usr/local/include/llvm/ADT/Optional.h:243:44: error: ‘in_place’ is not a member of ‘std’ | |
243 | constexpr Optional(T &&y) : Storage(std::in_place, std::move(y)) {} | |
| ^~~~~~~~ | |
/usr/local/include/llvm/ADT/Optional.h: At global scope: | |
/usr/local/include/llvm/ADT/Optional.h:296:34: error: expected constructor, destructor, or type conversion before ‘;’ token | |
296 | Optional(const T&) -> Optional<T>; | |
| ^ | |
/usr/local/include/llvm/ADT/Optional.h:337:54: error: ‘std::nullopt_t’ has not been declared | |
337 | constexpr bool operator==(const Optional<T> &X, std::nullopt_t) { | |
| ^~~~~~~~~ | |
/usr/local/include/llvm/ADT/Optional.h:342:32: error: declaration of ‘operator==’ as non-function | |
342 | constexpr bool operator==(std::nullopt_t, const Optional<T> &X) { | |
| ^~~~~~~~~ | |
/usr/local/include/llvm/ADT/Optional.h:342:32: error: ‘nullopt_t’ is not a member of ‘std’; did you mean ‘nullptr_t’? | |
342 | constexpr bool operator==(std::nullopt_t, const Optional<T> &X) { | |
| ^~~~~~~~~ | |
| nullptr_t | |
/usr/local/include/llvm/ADT/Optional.h:342:43: error: expected primary-expression before ‘const’ | |
342 | constexpr bool operator==(std::nullopt_t, const Optional<T> &X) { | |
| ^~~~~ | |
/usr/local/include/llvm/ADT/Optional.h:347:54: error: ‘std::nullopt_t’ has not been declared | |
347 | constexpr bool operator!=(const Optional<T> &X, std::nullopt_t) { | |
| ^~~~~~~~~ | |
/usr/local/include/llvm/ADT/Optional.h: In function ‘constexpr bool llvm::operator!=(const llvm::Optional<T>&, int)’: | |
/usr/local/include/llvm/ADT/Optional.h:348:22: error: ‘nullopt’ is not a member of ‘std’ | |
348 | return !(X == std::nullopt); | |
| ^~~~~~~ | |
/usr/local/include/llvm/ADT/Optional.h: At global scope: | |
/usr/local/include/llvm/ADT/Optional.h:352:32: error: declaration of ‘operator!=’ as non-function | |
352 | constexpr bool operator!=(std::nullopt_t, const Optional<T> &X) { | |
| ^~~~~~~~~ | |
/usr/local/include/llvm/ADT/Optional.h:352:32: error: ‘nullopt_t’ is not a member of ‘std’; did you mean ‘nullptr_t’? | |
352 | constexpr bool operator!=(std::nullopt_t, const Optional<T> &X) { | |
| ^~~~~~~~~ | |
| nullptr_t | |
/usr/local/include/llvm/ADT/Optional.h:352:43: error: expected primary-expression before ‘const’ | |
352 | constexpr bool operator!=(std::nullopt_t, const Optional<T> &X) { | |
| ^~~~~ | |
/usr/local/include/llvm/ADT/Optional.h:357:52: error: ‘std::nullopt_t’ has not been declared | |
357 | constexpr bool operator<(const Optional<T> &, std::nullopt_t) { | |
| ^~~~~~~~~ | |
/usr/local/include/llvm/ADT/Optional.h:362:31: error: declaration of ‘operator<’ as non-function | |
362 | constexpr bool operator<(std::nullopt_t, const Optional<T> &X) { | |
| ^~~~~~~~~ | |
/usr/local/include/llvm/ADT/Optional.h:362:31: error: ‘nullopt_t’ is not a member of ‘std’; did you mean ‘nullptr_t’? | |
362 | constexpr bool operator<(std::nullopt_t, const Optional<T> &X) { | |
| ^~~~~~~~~ | |
| nullptr_t | |
/usr/local/include/llvm/ADT/Optional.h:362:42: error: expected primary-expression before ‘const’ | |
362 | constexpr bool operator<(std::nullopt_t, const Optional<T> &X) { | |
| ^~~~~ | |
/usr/local/include/llvm/ADT/Optional.h:367:54: error: ‘std::nullopt_t’ has not been declared | |
367 | constexpr bool operator<=(const Optional<T> &X, std::nullopt_t) { | |
| ^~~~~~~~~ | |
/usr/local/include/llvm/ADT/Optional.h: In function ‘constexpr bool llvm::operator<=(const llvm::Optional<T>&, int)’: | |
/usr/local/include/llvm/ADT/Optional.h:368:17: error: ‘nullopt’ is not a member of ‘std’ | |
368 | return !(std::nullopt < X); | |
| ^~~~~~~ | |
/usr/local/include/llvm/ADT/Optional.h: At global scope: | |
/usr/local/include/llvm/ADT/Optional.h:372:32: error: declaration of ‘operator<=’ as non-function | |
372 | constexpr bool operator<=(std::nullopt_t, const Optional<T> &X) { | |
| ^~~~~~~~~ | |
/usr/local/include/llvm/ADT/Optional.h:372:32: error: ‘nullopt_t’ is not a member of ‘std’; did you mean ‘nullptr_t’? | |
372 | constexpr bool operator<=(std::nullopt_t, const Optional<T> &X) { | |
| ^~~~~~~~~ | |
| nullptr_t | |
/usr/local/include/llvm/ADT/Optional.h:372:43: error: expected primary-expression before ‘const’ | |
372 | constexpr bool operator<=(std::nullopt_t, const Optional<T> &X) { | |
| ^~~~~ | |
/usr/local/include/llvm/ADT/Optional.h:377:53: error: ‘std::nullopt_t’ has not been declared | |
377 | constexpr bool operator>(const Optional<T> &X, std::nullopt_t) { | |
| ^~~~~~~~~ | |
/usr/local/include/llvm/ADT/Optional.h: In function ‘constexpr bool llvm::operator>(const llvm::Optional<T>&, int)’: | |
/usr/local/include/llvm/ADT/Optional.h:378:15: error: ‘nullopt’ is not a member of ‘std’ | |
378 | return std::nullopt < X; | |
| ^~~~~~~ | |
/usr/local/include/llvm/ADT/Optional.h: At global scope: | |
/usr/local/include/llvm/ADT/Optional.h:382:31: error: declaration of ‘operator>’ as non-function | |
382 | constexpr bool operator>(std::nullopt_t, const Optional<T> &X) { | |
| ^~~~~~~~~ | |
/usr/local/include/llvm/ADT/Optional.h:382:31: error: ‘nullopt_t’ is not a member of ‘std’; did you mean ‘nullptr_t’? | |
382 | constexpr bool operator>(std::nullopt_t, const Optional<T> &X) { | |
| ^~~~~~~~~ | |
| nullptr_t | |
/usr/local/include/llvm/ADT/Optional.h:382:42: error: expected primary-expression before ‘const’ | |
382 | constexpr bool operator>(std::nullopt_t, const Optional<T> &X) { | |
| ^~~~~ | |
/usr/local/include/llvm/ADT/Optional.h:387:54: error: ‘std::nullopt_t’ has not been declared | |
387 | constexpr bool operator>=(const Optional<T> &X, std::nullopt_t) { | |
| ^~~~~~~~~ | |
/usr/local/include/llvm/ADT/Optional.h: In function ‘constexpr bool llvm::operator>=(const llvm::Optional<T>&, int)’: | |
/usr/local/include/llvm/ADT/Optional.h:388:15: error: ‘nullopt’ is not a member of ‘std’ | |
388 | return std::nullopt <= X; | |
| ^~~~~~~ | |
/usr/local/include/llvm/ADT/Optional.h: At global scope: | |
/usr/local/include/llvm/ADT/Optional.h:392:32: error: declaration of ‘operator>=’ as non-function | |
392 | constexpr bool operator>=(std::nullopt_t, const Optional<T> &X) { | |
| ^~~~~~~~~ | |
/usr/local/include/llvm/ADT/Optional.h:392:32: error: ‘nullopt_t’ is not a member of ‘std’; did you mean ‘nullptr_t’? | |
392 | constexpr bool operator>=(std::nullopt_t, const Optional<T> &X) { | |
| ^~~~~~~~~ | |
| nullptr_t | |
/usr/local/include/llvm/ADT/Optional.h:392:43: error: expected primary-expression before ‘const’ | |
392 | constexpr bool operator>=(std::nullopt_t, const Optional<T> &X) { | |
| ^~~~~ | |
In file included from /usr/local/include/llvm/ADT/STLExtras.h:21, | |
from /usr/local/include/llvm/PassAnalysisSupport.h:25, | |
from /usr/local/include/llvm/Pass.h:347, | |
from /home/user/llvm-pass-tutorial/skeleton/Skeleton.cpp:1: | |
/usr/local/include/llvm/ADT/STLForwardCompat.h:47:35: error: ‘optional’ in namespace ‘std’ does not name a template type | |
47 | auto transformOptional(const std::optional<T> &O, const Function &F) | |
| ^~~~~~~~ | |
/usr/local/include/llvm/ADT/STLForwardCompat.h:47:30: note: ‘std::optional’ is only available from C++17 onwards | |
47 | auto transformOptional(const std::optional<T> &O, const Function &F) | |
| ^~~ | |
/usr/local/include/llvm/ADT/STLForwardCompat.h:47:43: error: expected ‘,’ or ‘...’ before ‘<’ token | |
47 | auto transformOptional(const std::optional<T> &O, const Function &F) | |
| ^ | |
/usr/local/include/llvm/ADT/STLForwardCompat.h:48:13: error: ‘optional’ in namespace ‘std’ does not name a template type | |
48 | -> std::optional<decltype(F(O.value()))> { | |
| ^~~~~~~~ | |
/usr/local/include/llvm/ADT/STLForwardCompat.h:48:8: note: ‘std::optional’ is only available from C++17 onwards | |
48 | -> std::optional<decltype(F(O.value()))> { | |
| ^~~ | |
/usr/local/include/llvm/ADT/STLForwardCompat.h:48:21: error: expected initializer before ‘<’ token | |
48 | -> std::optional<decltype(F(O.value()))> { | |
| ^ | |
/usr/local/include/llvm/ADT/STLForwardCompat.h:57:29: error: ‘optional’ is not a member of ‘std’ | |
57 | auto transformOptional(std::optional<T> &&O, const Function &F) | |
| ^~~~~~~~ | |
/usr/local/include/llvm/ADT/STLForwardCompat.h:57:29: note: ‘std::optional’ is only available from C++17 onwards | |
/usr/local/include/llvm/ADT/STLForwardCompat.h:57:39: error: expected primary-expression before ‘>’ token | |
57 | auto transformOptional(std::optional<T> &&O, const Function &F) | |
| ^ | |
/usr/local/include/llvm/ADT/STLForwardCompat.h:57:43: error: label ‘O’ referenced outside of any function | |
57 | auto transformOptional(std::optional<T> &&O, const Function &F) | |
| ^ | |
/usr/local/include/llvm/ADT/STLForwardCompat.h:57:46: error: expected primary-expression before ‘const’ | |
57 | auto transformOptional(std::optional<T> &&O, const Function &F) | |
| ^~~~~ | |
/usr/local/include/llvm/ADT/STLForwardCompat.h:57:63: error: expression list treated as compound expression in initializer [-fpermissive] | |
57 | auto transformOptional(std::optional<T> &&O, const Function &F) | |
| ^ | |
/usr/local/include/llvm/ADT/STLForwardCompat.h:57:64: error: expected ‘;’ before ‘->’ token | |
57 | auto transformOptional(std::optional<T> &&O, const Function &F) | |
| ^ | |
| ; | |
58 | -> std::optional<decltype(F(std::move(O).value()))> { | |
| ~~ | |
/usr/local/include/llvm/ADT/STLForwardCompat.h:68:8: error: ‘template<class T, class Function> llvm::Optional<decltype (F(O.value()))> llvm::transformOptional(const llvm::Optional<T>&, const Function&)’ conflicts with a previous declaration | |
68 | -> Optional<decltype(F(O.value()))> { | |
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/usr/local/include/llvm/ADT/STLForwardCompat.h:57:6: note: previous declaration ‘template<class T, class Function> <typeprefixerror>llvm::transformOptional<T, Function>’ | |
57 | auto transformOptional(std::optional<T> &&O, const Function &F) | |
| ^~~~~~~~~~~~~~~~~ | |
/usr/local/include/llvm/ADT/STLForwardCompat.h: In function ‘llvm::Optional<decltype (F(O.value()))> llvm::transformOptional(const llvm::Optional<T>&, const Function&)’: | |
/usr/local/include/llvm/ADT/STLForwardCompat.h:71:15: error: ‘nullopt’ is not a member of ‘std’ | |
71 | return std::nullopt; | |
| ^~~~~~~ | |
/usr/local/include/llvm/ADT/STLForwardCompat.h: At global scope: | |
/usr/local/include/llvm/ADT/STLForwardCompat.h:78:8: error: ‘template<class T, class Function> llvm::Optional<decltype (F(std::move(O).value()))> llvm::transformOptional(llvm::Optional<T>&&, const Function&)’ conflicts with a previous declaration | |
78 | -> Optional<decltype(F(std::move(O).value()))> { | |
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
/usr/local/include/llvm/ADT/STLForwardCompat.h:57:6: note: previous declaration ‘template<class T, class Function> <typeprefixerror>llvm::transformOptional<T, Function>’ | |
57 | auto transformOptional(std::optional<T> &&O, const Function &F) | |
| ^~~~~~~~~~~~~~~~~ | |
/usr/local/include/llvm/ADT/STLForwardCompat.h: In function ‘llvm::Optional<decltype (F(std::move(O).value()))> llvm::transformOptional(llvm::Optional<T>&&, const Function&)’: | |
/usr/local/include/llvm/ADT/STLForwardCompat.h:81:15: error: ‘nullopt’ is not a member of ‘std’ | |
81 | return std::nullopt; | |
| ^~~~~~~ | |
In file included from /usr/local/include/llvm/PassAnalysisSupport.h:25, | |
from /usr/local/include/llvm/Pass.h:347, | |
from /home/user/llvm-pass-tutorial/skeleton/Skeleton.cpp:1: | |
/usr/local/include/llvm/ADT/STLExtras.h: At global scope: | |
/usr/local/include/llvm/ADT/STLExtras.h:144:24: error: ‘disjunction’ in namespace ‘std’ does not name a template type; did you mean ‘is_function’? | |
144 | using is_one_of = std::disjunction<std::is_same<T, Ts>...>; | |
| ^~~~~~~~~~~ | |
| is_function | |
/usr/local/include/llvm/ADT/STLExtras.h:149:26: error: ‘conjunction’ in namespace ‘std’ does not name a template type; did you mean ‘function’? | |
149 | using are_base_of = std::conjunction<std::is_base_of<T, Ts>...>; | |
| ^~~~~~~~~~~ | |
| function | |
/usr/local/include/llvm/ADT/STLExtras.h:155:37: error: ‘is_one_of’ was not declared in this scope | |
155 | : std::integral_constant<bool, !is_one_of<T, Us...>::value && | |
| ^~~~~~~~~ | |
/usr/local/include/llvm/ADT/STLExtras.h:155:55: error: template argument 2 is invalid | |
155 | : std::integral_constant<bool, !is_one_of<T, Us...>::value && | |
| ^ | |
/usr/local/include/llvm/ADT/STLExtras.h:155:56: error: expected ‘{’ before ‘::’ token | |
155 | : std::integral_constant<bool, !is_one_of<T, Us...>::value && | |
| ^~ | |
/usr/local/include/llvm/ADT/STLExtras.h:224:23: error: ‘is_function_v’ is not a member of ‘std’; did you mean ‘is_function’? | |
224 | bool = std::is_function_v<std::remove_pointer_t<remove_cvref_t<T>>>> | |
| ^~~~~~~~~~~~~ | |
| is_function | |
/usr/local/include/llvm/ADT/STLExtras.h:224:77: error: expected primary-expression before ‘>>’ token | |
224 | bool = std::is_function_v<std::remove_pointer_t<remove_cvref_t<T>>>> | |
| ^~ | |
/usr/local/include/llvm/ADT/STLExtras.h:224:77: error: expected ‘>’ before ‘>>’ token | |
/usr/local/include/llvm/ADT/STLExtras.h:230:8: error: ‘optional’ in namespace ‘std’ does not name a template type | |
230 | std::optional<value_type> Obj; | |
| ^~~~~~~~ | |
/usr/local/include/llvm/ADT/STLExtras.h:230:3: note: ‘std::optional’ is only available from C++17 onwards | |
230 | std::optional<value_type> Obj; | |
| ^~~ | |
/usr/local/include/llvm/ADT/STLExtras.h:232:23: error: ‘is_pointer_v’ is not a member of ‘std’; did you mean ‘is_pointer’? | |
232 | static_assert(!std::is_pointer_v<value_type>, | |
| ^~~~~~~~~~~~ | |
| is_pointer | |
/usr/local/include/llvm/ADT/STLExtras.h:232:46: error: expected primary-expression before ‘>’ token | |
232 | static_assert(!std::is_pointer_v<value_type>, | |
| ^ | |
/usr/local/include/llvm/ADT/STLExtras.h:232:47: error: expected primary-expression before ‘,’ token | |
232 | static_assert(!std::is_pointer_v<value_type>, | |
| ^ | |
/usr/local/include/llvm/ADT/STLExtras.h:257:35: error: ‘is_invocable_v’ is not a member of ‘std’ | |
257 | std::enable_if_t<std::is_invocable_v<T, Pn...>, int> = 0> | |
| ^~~~~~~~~~~~~~ | |
/usr/local/include/llvm/ADT/STLExtras.h:257:35: error: ‘is_invocable_v’ is not a member of ‘std’ | |
/usr/local/include/llvm/ADT/STLExtras.h:257:58: error: pack expansion argument for non-pack parameter ‘_Tp’ of alias template ‘template<bool _Cond, class _Tp> using enable_if_t = typename std::enable_if::type’ | |
257 | std::enable_if_t<std::is_invocable_v<T, Pn...>, int> = 0> | |
| ^ | |
In file included from /usr/include/c++/9/bits/move.h:55, | |
from /usr/include/c++/9/bits/stl_pair.h:59, | |
from /usr/include/c++/9/bits/stl_algobase.h:64, | |
from /usr/include/c++/9/bits/char_traits.h:39, | |
from /usr/include/c++/9/string:40, | |
from /usr/local/include/llvm/Pass.h:31, | |
from /home/user/llvm-pass-tutorial/skeleton/Skeleton.cpp:1: | |
/usr/include/c++/9/type_traits:2377:24: note: declared here | |
2377 | template<bool _Cond, typename _Tp = void> | |
| ^~~~~~~~ | |
In file included from /usr/local/include/llvm/PassAnalysisSupport.h:25, | |
from /usr/local/include/llvm/Pass.h:347, | |
from /home/user/llvm-pass-tutorial/skeleton/Skeleton.cpp:1: | |
/usr/local/include/llvm/ADT/STLExtras.h:257:66: error: expected unqualified-id before ‘=’ token | |
257 | std::enable_if_t<std::is_invocable_v<T, Pn...>, int> = 0> | |
| ^ | |
/usr/local/include/llvm/ADT/STLExtras.h:263:35: error: ‘is_invocable_v’ is not a member of ‘std’ | |
263 | std::enable_if_t<std::is_invocable_v<T const, Pn...>, int> = 0> | |
| ^~~~~~~~~~~~~~ | |
/usr/local/include/llvm/ADT/STLExtras.h:263:35: error: ‘is_invocable_v’ is not a member of ‘std’ | |
/usr/local/include/llvm/ADT/STLExtras.h:263:64: error: template argument 1 is invalid | |
263 | std::enable_if_t<std::is_invocable_v<T const, Pn...>, int> = 0> | |
| ^ | |
/usr/local/include/llvm/ADT/STLExtras.h:263:72: error: expected unqualified-id before ‘=’ token | |
263 | std::enable_if_t<std::is_invocable_v<T const, Pn...>, int> = 0> | |
| ^ | |
/usr/local/include/llvm/ADT/STLExtras.h: In constructor ‘llvm::callable_detail::Callable<T, <anonymous> >::Callable(const T&)’: | |
/usr/local/include/llvm/ADT/STLExtras.h:237:26: error: class ‘llvm::callable_detail::Callable<T, <anonymous> >’ does not have any field named ‘Obj’ | |
237 | Callable(T const &O) : Obj(std::in_place, O) {} | |
| ^~~ | |
/usr/local/include/llvm/ADT/STLExtras.h:237:35: error: ‘in_place’ is not a member of ‘std’ | |
237 | Callable(T const &O) : Obj(std::in_place, O) {} | |
| ^~~~~~~~ | |
/usr/local/include/llvm/ADT/STLExtras.h: In member function ‘llvm::callable_detail::Callable<T, <anonymous> >& llvm::callable_detail::Callable<T, <anonymous> >::operator=(const llvm::callable_detail::Callable<T, <anonymous> >&)’: | |
/usr/local/include/llvm/ADT/STLExtras.h:243:5: error: ‘Obj’ was not declared in this scope | |
243 | Obj = std::nullopt; | |
| ^~~ | |
/usr/local/include/llvm/ADT/STLExtras.h:243:16: error: ‘nullopt’ is not a member of ‘std’ | |
243 | Obj = std::nullopt; | |
| ^~~~~~~ | |
/usr/local/include/llvm/ADT/STLExtras.h: In member function ‘llvm::callable_detail::Callable<T, <anonymous> >& llvm::callable_detail::Callable<T, <anonymous> >::operator=(llvm::callable_detail::Callable<T, <anonymous> >&&)’: | |
/usr/local/include/llvm/ADT/STLExtras.h:250:5: error: ‘Obj’ was not declared in this scope | |
250 | Obj = std::nullopt; | |
| ^~~ | |
/usr/local/include/llvm/ADT/STLExtras.h:250:16: error: ‘nullopt’ is not a member of ‘std’ | |
250 | Obj = std::nullopt; | |
| ^~~~~~~ | |
/usr/local/include/llvm/ADT/STLExtras.h: In member function ‘bool llvm::callable_detail::Callable<T, <anonymous> >::valid() const’: | |
/usr/local/include/llvm/ADT/STLExtras.h:268:31: error: ‘Obj’ was not declared in this scope | |
268 | bool valid() const { return Obj != std::nullopt; } | |
| ^~~ | |
/usr/local/include/llvm/ADT/STLExtras.h:268:43: error: ‘nullopt’ is not a member of ‘std’ | |
268 | bool valid() const { return Obj != std::nullopt; } | |
| ^~~~~~~ | |
/usr/local/include/llvm/ADT/STLExtras.h: In member function ‘bool llvm::callable_detail::Callable<T, <anonymous> >::reset()’: | |
/usr/local/include/llvm/ADT/STLExtras.h:269:25: error: ‘Obj’ was not declared in this scope | |
269 | bool reset() { return Obj = std::nullopt; } | |
| ^~~ | |
/usr/local/include/llvm/ADT/STLExtras.h:269:36: error: ‘nullopt’ is not a member of ‘std’ | |
269 | bool reset() { return Obj = std::nullopt; } | |
| ^~~~~~~ | |
/usr/local/include/llvm/ADT/STLExtras.h: In member function ‘llvm::callable_detail::Callable<T, <anonymous> >::operator llvm::callable_detail::Callable<T, <anonymous> >::reference()’: | |
/usr/local/include/llvm/ADT/STLExtras.h:271:34: error: ‘Obj’ was not declared in this scope | |
271 | operator reference() { return *Obj; } | |
| ^~~ | |
/usr/local/include/llvm/ADT/STLExtras.h: In member function ‘llvm::callable_detail::Callable<T, <anonymous> >::operator llvm::callable_detail::Callable<T, <anonymous> >::const_reference() const’: | |
/usr/local/include/llvm/ADT/STLExtras.h:272:46: error: ‘Obj’ was not declared in this scope | |
272 | operator const_reference() const { return *Obj; } | |
| ^~~ | |
/usr/local/include/llvm/ADT/STLExtras.h: At global scope: | |
/usr/local/include/llvm/ADT/STLExtras.h:278:38: error: ‘is_pointer_v’ is not a member of ‘std’; did you mean ‘is_pointer’? | |
278 | static constexpr bool IsPtr = std::is_pointer_v<remove_cvref_t<T>>; | |
| ^~~~~~~~~~~~ | |
| is_pointer | |
/usr/local/include/llvm/ADT/STLExtras.h:278:67: error: expected primary-expression before ‘>’ token | |
278 | static constexpr bool IsPtr = std::is_pointer_v<remove_cvref_t<T>>; | |
| ^~ | |
/usr/local/include/llvm/ADT/STLExtras.h:278:69: error: expected primary-expression before ‘;’ token | |
278 | static constexpr bool IsPtr = std::is_pointer_v<remove_cvref_t<T>>; | |
| ^ | |
/usr/local/include/llvm/ADT/STLExtras.h:284:3: error: ‘StorageT’ does not name a type | |
284 | StorageT Func = nullptr; | |
| ^~~~~~~~ | |
/usr/local/include/llvm/ADT/STLExtras.h:307:13: error: ‘is_same_v’ is not a member of ‘std’; did you mean ‘is_same’? | |
307 | !std::is_same_v<remove_cvref_t<FnPtrOrRef>, Callable>, int | |
| ^~~~~~~~~ | |
| is_same | |
/usr/local/include/llvm/ADT/STLExtras.h:307:59: error: template argument 1 is invalid | |
307 | !std::is_same_v<remove_cvref_t<FnPtrOrRef>, Callable>, int | |
| ^ | |
/usr/local/include/llvm/ADT/STLExtras.h:308:7: error: expected unqualified-id before ‘=’ token | |
308 | > = 0 | |
| ^ | |
/usr/local/include/llvm/ADT/STLExtras.h:313:35: error: ‘is_invocable_v’ is not a member of ‘std’ | |
313 | std::enable_if_t<std::is_invocable_v<T, Pn...>, int> = 0> | |
| ^~~~~~~~~~~~~~ | |
/usr/local/include/llvm/ADT/STLExtras.h:313:35: error: ‘is_invocable_v’ is not a member of ‘std’ | |
/usr/local/include/llvm/ADT/STLExtras.h:313:58: error: pack expansion argument for non-pack parameter ‘_Tp’ of alias template ‘template<bool _Cond, class _Tp> using enable_if_t = typename std::enable_if::type’ | |
313 | std::enable_if_t<std::is_invocable_v<T, Pn...>, int> = 0> | |
| ^ | |
In file included from /usr/include/c++/9/bits/move.h:55, | |
from /usr/include/c++/9/bits/stl_pair.h:59, | |
from /usr/include/c++/9/bits/stl_algobase.h:64, | |
from /usr/include/c++/9/bits/char_traits.h:39, | |
from /usr/include/c++/9/string:40, | |
from /usr/local/include/llvm/Pass.h:31, | |
from /home/user/llvm-pass-tutorial/skeleton/Skeleton.cpp:1: | |
/usr/include/c++/9/type_traits:2377:24: note: declared here | |
2377 | template<bool _Cond, typename _Tp = void> | |
| ^~~~~~~~ | |
In file included from /usr/local/include/llvm/PassAnalysisSupport.h:25, | |
from /usr/local/include/llvm/Pass.h:347, | |
from /home/user/llvm-pass-tutorial/skeleton/Skeleton.cpp:1: | |
/usr/local/include/llvm/ADT/STLExtras.h:313:66: error: expected unqualified-id before ‘=’ token | |
313 | std::enable_if_t<std::is_invocable_v<T, Pn...>, int> = 0> | |
| ^ | |
/usr/local/include/llvm/ADT/STLExtras.h: In member function ‘bool llvm::callable_detail::Callable<T, true>::valid() const’: | |
/usr/local/include/llvm/ADT/STLExtras.h:318:31: error: ‘Func’ was not declared in this scope | |
318 | bool valid() const { return Func != nullptr; } | |
| ^~~~ | |
/usr/local/include/llvm/ADT/STLExtras.h: In member function ‘void llvm::callable_detail::Callable<T, true>::reset()’: | |
/usr/local/include/llvm/ADT/STLExtras.h:319:18: error: ‘Func’ was not declared in this scope | |
319 | void reset() { Func = nullptr; } | |
| ^~~~ | |
/usr/local/include/llvm/ADT/STLExtras.h: In member function ‘llvm::callable_detail::Callable<T, true>::operator const T&() const’: | |
/usr/local/include/llvm/ADT/STLExtras.h:324:14: error: ‘Func’ was not declared in this scope | |
324 | return Func; | |
| ^~~~ | |
/usr/local/include/llvm/ADT/STLExtras.h:326:26: error: ‘is_reference_v’ is not a member of ‘std’; did you mean ‘is_reference’? | |
326 | static_assert(std::is_reference_v<T>, | |
| ^~~~~~~~~~~~~~ | |
| is_reference | |
/usr/local/include/llvm/ADT/STLExtras.h:326:42: error: expected primary-expression before ‘>’ token | |
326 | static_assert(std::is_reference_v<T>, | |
| ^ | |
/usr/local/include/llvm/ADT/STLExtras.h:326:43: error: expected primary-expression before ‘,’ token | |
326 | static_assert(std::is_reference_v<T>, | |
| ^ | |
/usr/local/include/llvm/ADT/STLExtras.h:329:15: error: ‘Func’ was not declared in this scope | |
329 | return *Func; | |
| ^~~~ | |
/usr/local/include/llvm/ADT/STLExtras.h: At global scope: | |
/usr/local/include/llvm/ADT/STLExtras.h:423:35: error: template argument 2 is invalid | |
423 | callable_detail::Callable<FuncTy> F{}; | |
| ^ | |
/usr/local/include/llvm/ADT/STLExtras.h:923:60: error: ‘optional’ in namespace ‘std’ does not name a template type | |
923 | auto deref_or_none(const Iter &I, const Iter &End) -> std::optional< | |
| ^~~~~~~~ | |
/usr/local/include/llvm/ADT/STLExtras.h:923:55: note: ‘std::optional’ is only available from C++17 onwards | |
923 | auto deref_or_none(const Iter &I, const Iter &End) -> std::optional< | |
| ^~~ | |
/usr/local/include/llvm/ADT/STLExtras.h:923:68: error: expected initializer before ‘<’ token | |
923 | auto deref_or_none(const Iter &I, const Iter &End) -> std::optional< | |
| ^ | |
/usr/local/include/llvm/ADT/STLExtras.h:931:21: error: ‘optional’ in namespace ‘std’ does not name a template type | |
931 | using type = std::optional<std::remove_const_t< | |
| ^~~~~~~~ | |
/usr/local/include/llvm/ADT/STLExtras.h:931:16: note: ‘std::optional’ is only available from C++17 onwards | |
931 | using type = std::optional<std::remove_const_t< | |
| ^~~ | |
/usr/local/include/llvm/ADT/STLExtras.h:1509:24: error: ‘disjunction’ in namespace ‘std’ does not name a template type; did you mean ‘is_function’? | |
1509 | using is_one_of = std::disjunction<std::is_same<T, Ts>...>; | |
| ^~~~~~~~~~~ | |
| is_function | |
/usr/local/include/llvm/ADT/STLExtras.h:1514:26: error: ‘conjunction’ in namespace ‘std’ does not name a template type; did you mean ‘function’? | |
1514 | using are_base_of = std::conjunction<std::is_base_of<T, Ts>...>; | |
| ^~~~~~~~~~~ | |
| function | |
/usr/local/include/llvm/ADT/STLExtras.h:1673:38: error: ‘conjunction’ in namespace ‘std’ does not name a template type; did you mean ‘function’? | |
1673 | using sort_trivially_copyable = std::conjunction< | |
| ^~~~~~~~~~~ | |
| function | |
/usr/local/include/llvm/ADT/STLExtras.h: In function ‘void llvm::sort(IteratorTy, IteratorTy)’: | |
/usr/local/include/llvm/ADT/STLExtras.h:1682:25: error: ‘sort_trivially_copyable’ is not a member of ‘llvm::detail’ | |
1682 | if constexpr (detail::sort_trivially_copyable<IteratorTy>::value) { | |
| ^~~~~~~~~~~~~~~~~~~~~~~ | |
/usr/local/include/llvm/ADT/STLExtras.h:1682:59: error: expected primary-expression before ‘>’ token | |
1682 | if constexpr (detail::sort_trivially_copyable<IteratorTy>::value) { | |
| ^ | |
/usr/local/include/llvm/ADT/STLExtras.h:1682:62: error: ‘::value’ has not been declared | |
1682 | if constexpr (detail::sort_trivially_copyable<IteratorTy>::value) { | |
| ^~~~~ | |
/usr/local/include/llvm/ADT/STLExtras.h: In function ‘bool llvm::detail::all_of_zip_predicate_first(Predicate&&, Args&& ...)’: | |
/usr/local/include/llvm/ADT/STLExtras.h:2274:15: error: ‘apply’ is not a member of ‘std’ | |
2274 | if (!std::apply([&](auto &&...args) { return P(args...); }, *it)) | |
| ^~~~~ | |
In file included from /usr/local/include/llvm/ADT/StringRef.h:12, | |
from /usr/local/include/llvm/PassSupport.h:27, | |
from /usr/local/include/llvm/Pass.h:348, | |
from /home/user/llvm-pass-tutorial/skeleton/Skeleton.cpp:1: | |
/usr/local/include/llvm/ADT/DenseMapInfo.h: At global scope: | |
/usr/local/include/llvm/ADT/DenseMapInfo.h:294:52: error: ‘variant’ is not a member of ‘std’ | |
294 | template <typename... Ts> struct DenseMapInfo<std::variant<Ts...>> { | |
| ^~~~~~~ | |
/usr/local/include/llvm/ADT/DenseMapInfo.h:294:52: note: ‘std::variant’ is only available from C++17 onwards | |
/usr/local/include/llvm/ADT/DenseMapInfo.h:294:52: error: ‘variant’ is not a member of ‘std’ | |
/usr/local/include/llvm/ADT/DenseMapInfo.h:294:52: note: ‘std::variant’ is only available from C++17 onwards | |
/usr/local/include/llvm/ADT/DenseMapInfo.h:294:62: error: expected parameter pack before ‘...’ | |
294 | template <typename... Ts> struct DenseMapInfo<std::variant<Ts...>> { | |
| ^~~ | |
/usr/local/include/llvm/ADT/DenseMapInfo.h:294:62: error: template argument 1 is invalid | |
/usr/local/include/llvm/ADT/DenseMapInfo.h:294:65: error: expected unqualified-id before ‘>’ token | |
294 | template <typename... Ts> struct DenseMapInfo<std::variant<Ts...>> { | |
| ^~ | |
In file included from /usr/local/include/llvm/PassSupport.h:27, | |
from /usr/local/include/llvm/Pass.h:348, | |
from /home/user/llvm-pass-tutorial/skeleton/Skeleton.cpp:1: | |
/usr/local/include/llvm/ADT/StringRef.h:104:54: error: expected ‘)’ before ‘Str’ | |
104 | /*implicit*/ constexpr StringRef(std::string_view Str) | |
| ~ ^~~~ | |
| ) | |
/usr/local/include/llvm/ADT/StringRef.h:247:14: error: expected type-specifier | |
247 | operator std::string_view() const { | |
| ^~~ | |
In file included from /usr/local/include/llvm/Support/MathExtras.h:16, | |
from /usr/local/include/llvm/ADT/DenseMap.h:21, | |
from /usr/local/include/llvm/PassRegistry.h:19, | |
from /usr/local/include/llvm/PassSupport.h:29, | |
from /usr/local/include/llvm/Pass.h:348, | |
from /home/user/llvm-pass-tutorial/skeleton/Skeleton.cpp:1: | |
/usr/local/include/llvm/ADT/bit.h:38:56: error: ‘is_unsigned_v’ is not a member of ‘std’; did you mean ‘is_unsigned’? | |
38 | template <typename T, typename = std::enable_if_t<std::is_unsigned_v<T>>> | |
| ^~~~~~~~~~~~~ | |
| is_unsigned | |
/usr/local/include/llvm/ADT/bit.h:38:56: error: ‘is_unsigned_v’ is not a member of ‘std’; did you mean ‘is_unsigned’? | |
38 | template <typename T, typename = std::enable_if_t<std::is_unsigned_v<T>>> | |
| ^~~~~~~~~~~~~ | |
| is_unsigned | |
/usr/local/include/llvm/ADT/bit.h:38:70: error: template argument 1 is invalid | |
38 | template <typename T, typename = std::enable_if_t<std::is_unsigned_v<T>>> | |
| ^ | |
/usr/local/include/llvm/ADT/bit.h:38:73: error: expected unqualified-id before ‘>’ token | |
38 | template <typename T, typename = std::enable_if_t<std::is_unsigned_v<T>>> | |
| ^ | |
/usr/local/include/llvm/ADT/bit.h:77:56: error: ‘is_unsigned_v’ is not a member of ‘std’; did you mean ‘is_unsigned’? | |
77 | template <typename T, typename = std::enable_if_t<std::is_unsigned_v<T>>> | |
| ^~~~~~~~~~~~~ | |
| is_unsigned | |
/usr/local/include/llvm/ADT/bit.h:77:56: error: ‘is_unsigned_v’ is not a member of ‘std’; did you mean ‘is_unsigned’? | |
77 | template <typename T, typename = std::enable_if_t<std::is_unsigned_v<T>>> | |
| ^~~~~~~~~~~~~ | |
| is_unsigned | |
/usr/local/include/llvm/ADT/bit.h:77:70: error: template argument 1 is invalid | |
77 | template <typename T, typename = std::enable_if_t<std::is_unsigned_v<T>>> | |
| ^ | |
/usr/local/include/llvm/ADT/bit.h:77:73: error: expected unqualified-id before ‘>’ token | |
77 | template <typename T, typename = std::enable_if_t<std::is_unsigned_v<T>>> | |
| ^ | |
In file included from /usr/local/include/llvm/ADT/DenseMap.h:21, | |
from /usr/local/include/llvm/PassRegistry.h:19, | |
from /usr/local/include/llvm/PassSupport.h:29, | |
from /usr/local/include/llvm/Pass.h:348, | |
from /home/user/llvm-pass-tutorial/skeleton/Skeleton.cpp:1: | |
/usr/local/include/llvm/Support/MathExtras.h: In function ‘unsigned int llvm::countTrailingZeros(T, llvm::ZeroBehavior)’: | |
/usr/local/include/llvm/Support/MathExtras.h:153:22: error: ‘is_unsigned_v’ is not a member of ‘std’; did you mean ‘is_unsigned’? | |
153 | static_assert(std::is_unsigned_v<T>, | |
| ^~~~~~~~~~~~~ | |
| is_unsigned | |
/usr/local/include/llvm/Support/MathExtras.h:153:37: error: expected primary-expression before ‘>’ token | |
153 | static_assert(std::is_unsigned_v<T>, | |
| ^ | |
/usr/local/include/llvm/Support/MathExtras.h:153:38: error: expected primary-expression before ‘,’ token | |
153 | static_assert(std::is_unsigned_v<T>, | |
| ^ | |
/usr/local/include/llvm/Support/MathExtras.h: In function ‘unsigned int llvm::countLeadingZeros(T, llvm::ZeroBehavior)’: | |
/usr/local/include/llvm/Support/MathExtras.h:221:22: error: ‘is_unsigned_v’ is not a member of ‘std’; did you mean ‘is_unsigned’? | |
221 | static_assert(std::is_unsigned_v<T>, | |
| ^~~~~~~~~~~~~ | |
| is_unsigned | |
/usr/local/include/llvm/Support/MathExtras.h:221:37: error: expected primary-expression before ‘>’ token | |
221 | static_assert(std::is_unsigned_v<T>, | |
| ^ | |
/usr/local/include/llvm/Support/MathExtras.h:221:38: error: expected primary-expression before ‘,’ token | |
221 | static_assert(std::is_unsigned_v<T>, | |
| ^ | |
/usr/local/include/llvm/Support/MathExtras.h: In function ‘constexpr bool llvm::isPowerOf2_32(uint32_t)’: | |
/usr/local/include/llvm/Support/MathExtras.h:459:16: error: ‘has_single_bit’ is not a member of ‘llvm’ | |
459 | return llvm::has_single_bit(Value); | |
| ^~~~~~~~~~~~~~ | |
/usr/local/include/llvm/Support/MathExtras.h: In function ‘constexpr bool llvm::isPowerOf2_64(uint64_t)’: | |
/usr/local/include/llvm/Support/MathExtras.h:464:16: error: ‘has_single_bit’ is not a member of ‘llvm’ | |
464 | return llvm::has_single_bit(Value); | |
| ^~~~~~~~~~~~~~ | |
/usr/local/include/llvm/Support/MathExtras.h: In function ‘unsigned int llvm::countLeadingOnes(T, llvm::ZeroBehavior)’: | |
/usr/local/include/llvm/Support/MathExtras.h:477:22: error: ‘is_unsigned_v’ is not a member of ‘std’; did you mean ‘is_unsigned’? | |
477 | static_assert(std::is_unsigned_v<T>, | |
| ^~~~~~~~~~~~~ | |
| is_unsigned | |
/usr/local/include/llvm/Support/MathExtras.h:477:37: error: expected primary-expression before ‘>’ token | |
477 | static_assert(std::is_unsigned_v<T>, | |
| ^ | |
/usr/local/include/llvm/Support/MathExtras.h:477:38: error: expected primary-expression before ‘,’ token | |
477 | static_assert(std::is_unsigned_v<T>, | |
| ^ | |
/usr/local/include/llvm/Support/MathExtras.h: In function ‘unsigned int llvm::countTrailingOnes(T, llvm::ZeroBehavior)’: | |
/usr/local/include/llvm/Support/MathExtras.h:492:22: error: ‘is_unsigned_v’ is not a member of ‘std’; did you mean ‘is_unsigned’? | |
492 | static_assert(std::is_unsigned_v<T>, | |
| ^~~~~~~~~~~~~ | |
| is_unsigned | |
/usr/local/include/llvm/Support/MathExtras.h:492:37: error: expected primary-expression before ‘>’ token | |
492 | static_assert(std::is_unsigned_v<T>, | |
| ^ | |
/usr/local/include/llvm/Support/MathExtras.h:492:38: error: expected primary-expression before ‘,’ token | |
492 | static_assert(std::is_unsigned_v<T>, | |
| ^ | |
/usr/local/include/llvm/Support/MathExtras.h: In function ‘unsigned int llvm::countPopulation(T)’: | |
/usr/local/include/llvm/Support/MathExtras.h:502:22: error: ‘is_unsigned_v’ is not a member of ‘std’; did you mean ‘is_unsigned’? | |
502 | static_assert(std::is_unsigned_v<T>, | |
| ^~~~~~~~~~~~~ | |
| is_unsigned | |
/usr/local/include/llvm/Support/MathExtras.h:502:37: error: expected primary-expression before ‘>’ token | |
502 | static_assert(std::is_unsigned_v<T>, | |
| ^ | |
/usr/local/include/llvm/Support/MathExtras.h:502:38: error: expected primary-expression before ‘,’ token | |
502 | static_assert(std::is_unsigned_v<T>, | |
| ^ | |
/usr/local/include/llvm/Support/MathExtras.h:504:26: error: ‘popcount’ is not a member of ‘llvm’; did you mean ‘count’? | |
504 | return (unsigned)llvm::popcount(Value); | |
| ^~~~~~~~ | |
| count | |
/usr/local/include/llvm/Support/MathExtras.h: At global scope: | |
/usr/local/include/llvm/Support/MathExtras.h:759:23: error: ‘is_unsigned_v’ is not a member of ‘std’; did you mean ‘is_unsigned’? | |
759 | std::enable_if_t<std::is_unsigned_v<T>, T> SaturatingAdd(T X, T Y, T Z, | |
| ^~~~~~~~~~~~~ | |
| is_unsigned | |
/usr/local/include/llvm/Support/MathExtras.h:759:23: error: ‘is_unsigned_v’ is not a member of ‘std’; did you mean ‘is_unsigned’? | |
759 | std::enable_if_t<std::is_unsigned_v<T>, T> SaturatingAdd(T X, T Y, T Z, | |
| ^~~~~~~~~~~~~ | |
| is_unsigned | |
/usr/local/include/llvm/Support/MathExtras.h:759:38: error: template argument 1 is invalid | |
759 | std::enable_if_t<std::is_unsigned_v<T>, T> SaturatingAdd(T X, T Y, T Z, | |
| ^ | |
/usr/local/include/llvm/Support/MathExtras.h:759:39: error: expected unqualified-id before ‘,’ token | |
759 | std::enable_if_t<std::is_unsigned_v<T>, T> SaturatingAdd(T X, T Y, T Z, | |
| ^ | |
In file included from /usr/local/include/llvm/ADT/StringMap.h:17, | |
from /usr/local/include/llvm/PassRegistry.h:20, | |
from /usr/local/include/llvm/PassSupport.h:29, | |
from /usr/local/include/llvm/Pass.h:348, | |
from /home/user/llvm-pass-tutorial/skeleton/Skeleton.cpp:1: | |
/usr/local/include/llvm/ADT/StringMapEntry.h:88:34: error: ‘nullopt_t’ is not a member of ‘std’; did you mean ‘nullptr_t’? | |
88 | class StringMapEntryStorage<std::nullopt_t> : public StringMapEntryBase { | |
| ^~~~~~~~~ | |
| nullptr_t | |
/usr/local/include/llvm/ADT/StringMapEntry.h:88:34: error: ‘nullopt_t’ is not a member of ‘std’; did you mean ‘nullptr_t’? | |
88 | class StringMapEntryStorage<std::nullopt_t> : public StringMapEntryBase { | |
| ^~~~~~~~~ | |
| nullptr_t | |
/usr/local/include/llvm/ADT/StringMapEntry.h:88:43: error: template argument 1 is invalid | |
88 | class StringMapEntryStorage<std::nullopt_t> : public StringMapEntryBase { | |
| ^ | |
In file included from /usr/local/include/llvm/Support/CBindingWrapping.h:17, | |
from /usr/local/include/llvm/PassRegistry.h:22, | |
from /usr/local/include/llvm/PassSupport.h:29, | |
from /usr/local/include/llvm/Pass.h:348, | |
from /home/user/llvm-pass-tutorial/skeleton/Skeleton.cpp:1: | |
/usr/local/include/llvm/Support/Casting.h:594:10: error: ‘is_pointer_v’ is not a member of ‘std’; did you mean ‘is_pointer’? | |
594 | std::is_pointer_v<T> || std::is_constructible_v<T, std::nullptr_t>; | |
| ^~~~~~~~~~~~ | |
| is_pointer | |
/usr/local/include/llvm/Support/Casting.h:594:24: error: expected primary-expression before ‘>’ token | |
594 | std::is_pointer_v<T> || std::is_constructible_v<T, std::nullptr_t>; | |
| ^ | |
/usr/local/include/llvm/Support/Casting.h:594:26: error: expected primary-expression before ‘||’ token | |
594 | std::is_pointer_v<T> || std::is_constructible_v<T, std::nullptr_t>; | |
| ^~ | |
/usr/local/include/llvm/Support/Casting.h:594:34: error: ‘is_constructible_v’ is not a member of ‘std’; did you mean ‘is_constructible’? | |
594 | std::is_pointer_v<T> || std::is_constructible_v<T, std::nullptr_t>; | |
| ^~~~~~~~~~~~~~~~~~ | |
| is_constructible | |
/usr/local/include/llvm/Support/Casting.h:594:54: error: expected primary-expression before ‘,’ token | |
594 | std::is_pointer_v<T> || std::is_constructible_v<T, std::nullptr_t>; | |
| ^ | |
In file included from /usr/local/include/llvm/Support/RWMutex.h:17, | |
from /usr/local/include/llvm/PassRegistry.h:23, | |
from /usr/local/include/llvm/PassSupport.h:29, | |
from /usr/local/include/llvm/Pass.h:348, | |
from /home/user/llvm-pass-tutorial/skeleton/Skeleton.cpp:1: | |
/usr/local/include/llvm/Support/Threading.h:144:10: error: ‘optional’ in namespace ‘std’ does not name a template type | |
144 | std::optional<unsigned> compute_cpu_socket(unsigned ThreadPoolNum) const; | |
| ^~~~~~~~ | |
/usr/local/include/llvm/Support/Threading.h:144:5: note: ‘std::optional’ is only available from C++17 onwards | |
144 | std::optional<unsigned> compute_cpu_socket(unsigned ThreadPoolNum) const; | |
| ^~~ | |
/usr/local/include/llvm/Support/Threading.h:152:8: error: ‘optional’ in namespace ‘std’ does not name a template type | |
152 | std::optional<ThreadPoolStrategy> | |
| ^~~~~~~~ | |
/usr/local/include/llvm/Support/Threading.h:152:3: note: ‘std::optional’ is only available from C++17 onwards | |
152 | std::optional<ThreadPoolStrategy> | |
| ^~~ | |
/usr/local/include/llvm/Support/Threading.h:153:73: error: expected unqualified-id before ‘)’ token | |
153 | get_threadpool_strategy(StringRef Num, ThreadPoolStrategy Default = {}); | |
| ^ | |
/usr/local/include/llvm/Support/Threading.h: In function ‘llvm::ThreadPoolStrategy llvm::heavyweight_hardware_concurrency(llvm::StringRef)’: | |
/usr/local/include/llvm/Support/Threading.h:174:10: error: ‘optional’ is not a member of ‘std’ | |
174 | std::optional<ThreadPoolStrategy> S = | |
| ^~~~~~~~ | |
/usr/local/include/llvm/Support/Threading.h:174:10: note: ‘std::optional’ is only available from C++17 onwards | |
/usr/local/include/llvm/Support/Threading.h:174:37: error: expected primary-expression before ‘>’ token | |
174 | std::optional<ThreadPoolStrategy> S = | |
| ^ | |
/usr/local/include/llvm/Support/Threading.h:174:39: error: ‘S’ was not declared in this scope | |
174 | std::optional<ThreadPoolStrategy> S = | |
| ^ | |
/usr/local/include/llvm/Support/Threading.h:175:9: error: ‘get_threadpool_strategy’ was not declared in this scope; did you mean ‘ThreadPoolStrategy’? | |
175 | get_threadpool_strategy(Num, heavyweight_hardware_concurrency()); | |
| ^~~~~~~~~~~~~~~~~~~~~~~ | |
| ThreadPoolStrategy | |
In file included from /usr/local/include/llvm/PassRegistry.h:23, | |
from /usr/local/include/llvm/PassSupport.h:29, | |
from /usr/local/include/llvm/Pass.h:348, | |
from /home/user/llvm-pass-tutorial/skeleton/Skeleton.cpp:1: | |
/usr/local/include/llvm/Support/RWMutex.h: At global scope: | |
/usr/local/include/llvm/Support/RWMutex.h:96:8: error: ‘shared_mutex’ in namespace ‘std’ does not name a type | |
96 | std::shared_mutex impl; | |
| ^~~~~~~~~~~~ | |
/usr/local/include/llvm/Support/RWMutex.h:96:3: note: ‘std::shared_mutex’ is only available from C++17 onwards | |
96 | std::shared_mutex impl; | |
| ^~~ | |
/usr/local/include/llvm/Support/RWMutex.h: In member function ‘bool llvm::sys::SmartRWMutex<mt_only>::lock_shared()’: | |
/usr/local/include/llvm/Support/RWMutex.h:106:7: error: ‘impl’ was not declared in this scope | |
106 | impl.lock_shared(); | |
| ^~~~ | |
/usr/local/include/llvm/Support/RWMutex.h: In member function ‘bool llvm::sys::SmartRWMutex<mt_only>::unlock_shared()’: | |
/usr/local/include/llvm/Support/RWMutex.h:118:7: error: ‘impl’ was not declared in this scope | |
118 | impl.unlock_shared(); | |
| ^~~~ | |
/usr/local/include/llvm/Support/RWMutex.h: In member function ‘bool llvm::sys::SmartRWMutex<mt_only>::lock()’: | |
/usr/local/include/llvm/Support/RWMutex.h:131:7: error: ‘impl’ was not declared in this scope | |
131 | impl.lock(); | |
| ^~~~ | |
/usr/local/include/llvm/Support/RWMutex.h: In member function ‘bool llvm::sys::SmartRWMutex<mt_only>::unlock()’: | |
/usr/local/include/llvm/Support/RWMutex.h:144:7: error: ‘impl’ was not declared in this scope | |
144 | impl.unlock(); | |
| ^~~~ | |
In file included from /usr/local/include/llvm/IR/Function.h:22, | |
from /home/user/llvm-pass-tutorial/skeleton/Skeleton.cpp:2: | |
/usr/local/include/llvm/ADT/Twine.h: At global scope: | |
/usr/local/include/llvm/ADT/Twine.h:292:35: error: ‘string_view’ in namespace ‘std’ does not name a type | |
292 | /*implicit*/ Twine(const std::string_view &Str) | |
| ^~~~~~~~~~~ | |
/usr/local/include/llvm/ADT/Twine.h:292:30: note: ‘std::string_view’ is only available from C++17 onwards | |
292 | /*implicit*/ Twine(const std::string_view &Str) | |
| ^~~ | |
/usr/local/include/llvm/ADT/Twine.h: In constructor ‘llvm::Twine::Twine(const int&)’: | |
/usr/local/include/llvm/ADT/Twine.h:294:34: error: request for member ‘data’ in ‘Str’, which is of non-class type ‘const int’ | |
294 | LHS.ptrAndLength.ptr = Str.data(); | |
| ^~~~ | |
/usr/local/include/llvm/ADT/Twine.h:295:37: error: request for member ‘length’ in ‘Str’, which is of non-class type ‘const int’ | |
295 | LHS.ptrAndLength.length = Str.length(); | |
| ^~~~~~ | |
In file included from /usr/local/include/llvm/IR/Attributes.h:24, | |
from /usr/local/include/llvm/IR/Argument.h:17, | |
from /usr/local/include/llvm/IR/Function.h:25, | |
from /home/user/llvm-pass-tutorial/skeleton/Skeleton.cpp:2: | |
/usr/local/include/llvm/Support/Alignment.h: At global scope: | |
/usr/local/include/llvm/Support/Alignment.h:117:41: error: expected template-name before ‘<’ token | |
117 | struct MaybeAlign : public std::optional<Align> { | |
| ^ | |
/usr/local/include/llvm/Support/Alignment.h:117:41: error: expected ‘{’ before ‘<’ token | |
/usr/local/include/llvm/Support/Alignment.h:117:41: error: expected unqualified-id before ‘<’ token | |
/usr/local/include/llvm/Support/Alignment.h:217:35: error: ‘A’ has incomplete type | |
217 | inline unsigned encode(MaybeAlign A) { return A ? A->ShiftValue + 1 : 0; } | |
| ~~~~~~~~~~~^ | |
/usr/local/include/llvm/Support/Alignment.h:117:8: note: forward declaration of ‘struct llvm::MaybeAlign’ | |
117 | struct MaybeAlign : public std::optional<Align> { | |
| ^~~~~~~~~~ | |
/usr/local/include/llvm/Support/Alignment.h:220:50: error: return type ‘struct llvm::MaybeAlign’ is incomplete | |
220 | inline MaybeAlign decodeMaybeAlign(unsigned Value) { | |
| ^ | |
/usr/local/include/llvm/Support/Alignment.h:220:19: error: ambiguating new declaration of ‘void llvm::decodeMaybeAlign(unsigned int)’ | |
220 | inline MaybeAlign decodeMaybeAlign(unsigned Value) { | |
| ^~~~~~~~~~~~~~~~ | |
In file included from /usr/local/include/llvm/IR/Attributes.h:24, | |
from /usr/local/include/llvm/IR/Argument.h:17, | |
from /usr/local/include/llvm/IR/Function.h:25, | |
from /home/user/llvm-pass-tutorial/skeleton/Skeleton.cpp:2: | |
/usr/local/include/llvm/Support/Alignment.h:53:28: note: old declaration ‘llvm::MaybeAlign llvm::decodeMaybeAlign(unsigned int)’ | |
53 | friend struct MaybeAlign decodeMaybeAlign(unsigned Value); | |
| ^~~~~~~~~~~~~~~~ | |
In file included from /usr/local/include/llvm/IR/Attributes.h:24, | |
from /usr/local/include/llvm/IR/Argument.h:17, | |
from /usr/local/include/llvm/IR/Function.h:25, | |
from /home/user/llvm-pass-tutorial/skeleton/Skeleton.cpp:2: | |
/usr/local/include/llvm/Support/Alignment.h: In function ‘void llvm::decodeMaybeAlign(unsigned int)’: | |
/usr/local/include/llvm/Support/Alignment.h:222:23: error: invalid use of incomplete type ‘struct llvm::MaybeAlign’ | |
222 | return MaybeAlign(); | |
| ^ | |
/usr/local/include/llvm/Support/Alignment.h:117:8: note: forward declaration of ‘struct llvm::MaybeAlign’ | |
117 | struct MaybeAlign : public std::optional<Align> { | |
| ^~~~~~~~~~ | |
/usr/local/include/llvm/Support/Alignment.h:224:7: error: ‘uint8_t llvm::Align::ShiftValue’ is private within this context | |
224 | Out.ShiftValue = Value - 1; | |
| ^~~~~~~~~~ | |
In file included from /usr/local/include/llvm/IR/Attributes.h:24, | |
from /usr/local/include/llvm/IR/Argument.h:17, | |
from /usr/local/include/llvm/IR/Function.h:25, | |
from /home/user/llvm-pass-tutorial/skeleton/Skeleton.cpp:2: | |
/usr/local/include/llvm/Support/Alignment.h:41:11: note: declared private here | |
41 | uint8_t ShiftValue = 0; /// The log2 of the required alignment. | |
| ^~~~~~~~~~ | |
In file included from /usr/local/include/llvm/IR/Attributes.h:24, | |
from /usr/local/include/llvm/IR/Argument.h:17, | |
from /usr/local/include/llvm/IR/Function.h:25, | |
from /home/user/llvm-pass-tutorial/skeleton/Skeleton.cpp:2: | |
/usr/local/include/llvm/Support/Alignment.h: In function ‘unsigned int llvm::encode(llvm::Align)’: | |
/usr/local/include/llvm/Support/Alignment.h:230:61: error: invalid use of incomplete type ‘struct llvm::MaybeAlign’ | |
230 | inline unsigned encode(Align A) { return encode(MaybeAlign(A)); } | |
| ^ | |
/usr/local/include/llvm/Support/Alignment.h:117:8: note: forward declaration of ‘struct llvm::MaybeAlign’ | |
117 | struct MaybeAlign : public std::optional<Align> { | |
| ^~~~~~~~~~ | |
/usr/local/include/llvm/Support/Alignment.h: At global scope: | |
/usr/local/include/llvm/Support/Alignment.h:295:35: error: ‘Lhs’ has incomplete type | |
295 | inline bool operator==(MaybeAlign Lhs, Align Rhs) { return Lhs && *Lhs == Rhs; } | |
| ~~~~~~~~~~~^~~ | |
/usr/local/include/llvm/Support/Alignment.h:117:8: note: forward declaration of ‘struct llvm::MaybeAlign’ | |
117 | struct MaybeAlign : public std::optional<Align> { | |
| ^~~~~~~~~~ | |
/usr/local/include/llvm/Support/Alignment.h:296:35: error: ‘Lhs’ has incomplete type | |
296 | inline bool operator!=(MaybeAlign Lhs, Align Rhs) { return !(Lhs == Rhs); } | |
| ~~~~~~~~~~~^~~ | |
/usr/local/include/llvm/Support/Alignment.h:117:8: note: forward declaration of ‘struct llvm::MaybeAlign’ | |
117 | struct MaybeAlign : public std::optional<Align> { | |
| ^~~~~~~~~~ | |
/usr/local/include/llvm/Support/Alignment.h:297:46: error: ‘Rhs’ has incomplete type | |
297 | inline bool operator==(Align Lhs, MaybeAlign Rhs) { return Rhs == Lhs; } | |
| ~~~~~~~~~~~^~~ | |
/usr/local/include/llvm/Support/Alignment.h:117:8: note: forward declaration of ‘struct llvm::MaybeAlign’ | |
117 | struct MaybeAlign : public std::optional<Align> { | |
| ^~~~~~~~~~ | |
/usr/local/include/llvm/Support/Alignment.h:298:46: error: ‘Rhs’ has incomplete type | |
298 | inline bool operator!=(Align Lhs, MaybeAlign Rhs) { return !(Rhs == Lhs); } | |
| ~~~~~~~~~~~^~~ | |
/usr/local/include/llvm/Support/Alignment.h:117:8: note: forward declaration of ‘struct llvm::MaybeAlign’ | |
117 | struct MaybeAlign : public std::optional<Align> { | |
| ^~~~~~~~~~ | |
/usr/local/include/llvm/Support/Alignment.h:300:35: error: ‘Lhs’ has incomplete type | |
300 | inline bool operator==(MaybeAlign Lhs, MaybeAlign Rhs) { | |
| ~~~~~~~~~~~^~~ | |
/usr/local/include/llvm/Support/Alignment.h:117:8: note: forward declaration of ‘struct llvm::MaybeAlign’ | |
117 | struct MaybeAlign : public std::optional<Align> { | |
| ^~~~~~~~~~ | |
/usr/local/include/llvm/Support/Alignment.h:300:51: error: ‘Rhs’ has incomplete type | |
300 | inline bool operator==(MaybeAlign Lhs, MaybeAlign Rhs) { | |
| ~~~~~~~~~~~^~~ | |
/usr/local/include/llvm/Support/Alignment.h:117:8: note: forward declaration of ‘struct llvm::MaybeAlign’ | |
117 | struct MaybeAlign : public std::optional<Align> { | |
| ^~~~~~~~~~ | |
/usr/local/include/llvm/Support/Alignment.h:303:35: error: ‘Lhs’ has incomplete type | |
303 | inline bool operator!=(MaybeAlign Lhs, MaybeAlign Rhs) { return !(Lhs == Rhs); } | |
| ~~~~~~~~~~~^~~ | |
/usr/local/include/llvm/Support/Alignment.h:117:8: note: forward declaration of ‘struct llvm::MaybeAlign’ | |
117 | struct MaybeAlign : public std::optional<Align> { | |
| ^~~~~~~~~~ | |
/usr/local/include/llvm/Support/Alignment.h:303:51: error: ‘Rhs’ has incomplete type | |
303 | inline bool operator!=(MaybeAlign Lhs, MaybeAlign Rhs) { return !(Lhs == Rhs); } | |
| ~~~~~~~~~~~^~~ | |
/usr/local/include/llvm/Support/Alignment.h:117:8: note: forward declaration of ‘struct llvm::MaybeAlign’ | |
117 | struct MaybeAlign : public std::optional<Align> { | |
| ^~~~~~~~~~ | |
/usr/local/include/llvm/Support/Alignment.h:305:45: error: ‘std::nullopt_t’ has not been declared | |
305 | inline bool operator==(MaybeAlign Lhs, std::nullopt_t) { return !bool(Lhs); } | |
| ^~~~~~~~~ | |
/usr/local/include/llvm/Support/Alignment.h:305:35: error: ‘Lhs’ has incomplete type | |
305 | inline bool operator==(MaybeAlign Lhs, std::nullopt_t) { return !bool(Lhs); } | |
| ~~~~~~~~~~~^~~ | |
/usr/local/include/llvm/Support/Alignment.h:117:8: note: forward declaration of ‘struct llvm::MaybeAlign’ | |
117 | struct MaybeAlign : public std::optional<Align> { | |
| ^~~~~~~~~~ | |
/usr/local/include/llvm/Support/Alignment.h:306:45: error: ‘std::nullopt_t’ has not been declared | |
306 | inline bool operator!=(MaybeAlign Lhs, std::nullopt_t) { return bool(Lhs); } | |
| ^~~~~~~~~ | |
/usr/local/include/llvm/Support/Alignment.h:306:35: error: ‘Lhs’ has incomplete type | |
306 | inline bool operator!=(MaybeAlign Lhs, std::nullopt_t) { return bool(Lhs); } | |
| ~~~~~~~~~~~^~~ | |
/usr/local/include/llvm/Support/Alignment.h:117:8: note: forward declaration of ‘struct llvm::MaybeAlign’ | |
117 | struct MaybeAlign : public std::optional<Align> { | |
| ^~~~~~~~~~ | |
/usr/local/include/llvm/Support/Alignment.h:307:29: error: declaration of ‘operator==’ as non-function | |
307 | inline bool operator==(std::nullopt_t, MaybeAlign Rhs) { return !bool(Rhs); } | |
| ^~~~~~~~~ | |
/usr/local/include/llvm/Support/Alignment.h:307:29: error: ‘nullopt_t’ is not a member of ‘std’; did you mean ‘nullptr_t’? | |
307 | inline bool operator==(std::nullopt_t, MaybeAlign Rhs) { return !bool(Rhs); } | |
| ^~~~~~~~~ | |
| nullptr_t | |
/usr/local/include/llvm/Support/Alignment.h:307:51: error: expected primary-expression before ‘Rhs’ | |
307 | inline bool operator==(std::nullopt_t, MaybeAlign Rhs) { return !bool(Rhs); } | |
| ^~~ | |
/usr/local/include/llvm/Support/Alignment.h:308:29: error: declaration of ‘operator!=’ as non-function | |
308 | inline bool operator!=(std::nullopt_t, MaybeAlign Rhs) { return bool(Rhs); } | |
| ^~~~~~~~~ | |
/usr/local/include/llvm/Support/Alignment.h:308:29: error: ‘nullopt_t’ is not a member of ‘std’; did you mean ‘nullptr_t’? | |
308 | inline bool operator!=(std::nullopt_t, MaybeAlign Rhs) { return bool(Rhs); } | |
| ^~~~~~~~~ | |
| nullptr_t | |
/usr/local/include/llvm/Support/Alignment.h:308:51: error: expected primary-expression before ‘Rhs’ | |
308 | inline bool operator!=(std::nullopt_t, MaybeAlign Rhs) { return bool(Rhs); } | |
| ^~~ | |
/usr/local/include/llvm/Support/Alignment.h: In function ‘std::string llvm::DebugStr(const llvm::MaybeAlign&)’: | |
/usr/local/include/llvm/Support/Alignment.h:317:7: error: could not convert ‘MA’ from ‘const llvm::MaybeAlign’ to ‘bool’ | |
317 | if (MA) | |
| ^~ | |
| | | |
| const llvm::MaybeAlign | |
/usr/local/include/llvm/Support/Alignment.h:318:29: error: base operand of ‘->’ has non-pointer type ‘const llvm::MaybeAlign’ | |
318 | return std::to_string(MA->value()); | |
| ^~ | |
In file included from /usr/local/include/llvm/IR/Argument.h:17, | |
from /usr/local/include/llvm/IR/Function.h:25, | |
from /home/user/llvm-pass-tutorial/skeleton/Skeleton.cpp:2: | |
/usr/local/include/llvm/IR/Attributes.h: At global scope: | |
/usr/local/include/llvm/IR/Attributes.h:141:18: error: ‘optional’ in namespace ‘std’ does not name a template type | |
141 | const std::optional<unsigned> &NumElemsArg); | |
| ^~~~~~~~ | |
/usr/local/include/llvm/IR/Attributes.h:141:13: note: ‘std::optional’ is only available from C++17 onwards | |
141 | const std::optional<unsigned> &NumElemsArg); | |
| ^~~ | |
/usr/local/include/llvm/IR/Attributes.h:141:26: error: expected ‘,’ or ‘...’ before ‘<’ token | |
141 | const std::optional<unsigned> &NumElemsArg); | |
| ^ | |
/usr/local/include/llvm/IR/Attributes.h:234:28: error: ‘optional’ is not a member of ‘std’ | |
234 | std::pair<unsigned, std::optional<unsigned>> getAllocSizeArgs() const; | |
| ^~~~~~~~ | |
/usr/local/include/llvm/IR/Attributes.h:234:28: note: ‘std::optional’ is only available from C++17 onwards | |
/usr/local/include/llvm/IR/Attributes.h:234:28: error: ‘optional’ is not a member of ‘std’ | |
/usr/local/include/llvm/IR/Attributes.h:234:28: note: ‘std::optional’ is only available from C++17 onwards | |
/usr/local/include/llvm/IR/Attributes.h:234:45: error: template argument 2 is invalid | |
234 | std::pair<unsigned, std::optional<unsigned>> getAllocSizeArgs() const; | |
| ^~ | |
/usr/local/include/llvm/IR/Attributes.h:241:8: error: ‘optional’ in namespace ‘std’ does not name a template type | |
241 | std::optional<unsigned> getVScaleRangeMax() const; | |
| ^~~~~~~~ | |
/usr/local/include/llvm/IR/Attributes.h:241:3: note: ‘std::optional’ is only available from C++17 onwards | |
241 | std::optional<unsigned> getVScaleRangeMax() const; | |
| ^~~ | |
/usr/local/include/llvm/IR/Attributes.h:379:8: error: ‘optional’ in namespace ‘std’ does not name a template type | |
379 | std::optional<std::pair<unsigned, std::optional<unsigned>>> getAllocSizeArgs() | |
| ^~~~~~~~ | |
/usr/local/include/llvm/IR/Attributes.h:379:3: note: ‘std::optional’ is only available from C++17 onwards | |
379 | std::optional<std::pair<unsigned, std::optional<unsigned>>> getAllocSizeArgs() | |
| ^~~ | |
/usr/local/include/llvm/IR/Attributes.h:382:8: error: ‘optional’ in namespace ‘std’ does not name a template type | |
382 | std::optional<unsigned> getVScaleRangeMax() const; | |
| ^~~~~~~~ | |
/usr/local/include/llvm/IR/Attributes.h:382:3: note: ‘std::optional’ is only available from C++17 onwards | |
382 | std::optional<unsigned> getVScaleRangeMax() const; | |
| ^~~ | |
/usr/local/include/llvm/IR/Attributes.h:735:36: error: ‘optional’ in namespace ‘std’ does not name a template type | |
735 | const std::optional<unsigned> &NumElemsArg); | |
| ^~~~~~~~ | |
/usr/local/include/llvm/IR/Attributes.h:735:31: note: ‘std::optional’ is only available from C++17 onwards | |
735 | const std::optional<unsigned> &NumElemsArg); | |
| ^~~ | |
/usr/local/include/llvm/IR/Attributes.h:735:44: error: expected ‘,’ or ‘...’ before ‘<’ token | |
735 | const std::optional<unsigned> &NumElemsArg); | |
| ^ | |
/usr/local/include/llvm/IR/Attributes.h:1111:8: error: ‘optional’ in namespace ‘std’ does not name a template type | |
1111 | std::optional<uint64_t> getRawIntAttr(Attribute::AttrKind Kind) const; | |
| ^~~~~~~~ | |
/usr/local/include/llvm/IR/Attributes.h:1111:3: note: ‘std::optional’ is only available from C++17 onwards | |
1111 | std::optional<uint64_t> getRawIntAttr(Attribute::AttrKind Kind) const; | |
| ^~~ | |
/usr/local/include/llvm/IR/Attributes.h:1157:8: error: ‘optional’ in namespace ‘std’ does not name a template type | |
1157 | std::optional<std::pair<unsigned, std::optional<unsigned>>> getAllocSizeArgs() | |
| ^~~~~~~~ | |
/usr/local/include/llvm/IR/Attributes.h:1157:3: note: ‘std::optional’ is only available from C++17 onwards | |
1157 | std::optional<std::pair<unsigned, std::optional<unsigned>>> getAllocSizeArgs() | |
| ^~~ | |
/usr/local/include/llvm/IR/Attributes.h:1197:44: error: ‘optional’ in namespace ‘std’ does not name a template type | |
1197 | const std::optional<unsigned> &NumElemsArg); | |
| ^~~~~~~~ | |
/usr/local/include/llvm/IR/Attributes.h:1197:39: note: ‘std::optional’ is only available from C++17 onwards | |
1197 | const std::optional<unsigned> &NumElemsArg); | |
| ^~~ | |
/usr/local/include/llvm/IR/Attributes.h:1197:52: error: expected ‘,’ or ‘...’ before ‘<’ token | |
1197 | const std::optional<unsigned> &NumElemsArg); | |
| ^ | |
/usr/local/include/llvm/IR/Attributes.h:1201:40: error: ‘std::optional’ has not been declared | |
1201 | std::optional<unsigned> MaxValue); | |
| ^~~~~~~~ | |
/usr/local/include/llvm/IR/Attributes.h:1201:48: error: expected ‘,’ or ‘...’ before ‘<’ token | |
1201 | std::optional<unsigned> MaxValue); | |
| ^ | |
/usr/local/include/llvm/IR/Attributes.h:1114:35: error: return type ‘struct llvm::MaybeAlign’ is incomplete | |
1114 | MaybeAlign getAlignment() const { | |
| ^ | |
/usr/local/include/llvm/IR/Attributes.h: In member function ‘void llvm::AttrBuilder::getAlignment() const’: | |
/usr/local/include/llvm/IR/Attributes.h:1115:23: error: ‘getRawIntAttr’ was not declared in this scope; did you mean ‘addRawIntAttr’? | |
1115 | return MaybeAlign(getRawIntAttr(Attribute::Alignment).value_or(0)); | |
| ^~~~~~~~~~~~~ | |
| addRawIntAttr | |
/usr/local/include/llvm/IR/Attributes.h:1115:70: error: invalid use of incomplete type ‘struct llvm::MaybeAlign’ | |
1115 | return MaybeAlign(getRawIntAttr(Attribute::Alignment).value_or(0)); | |
| ^ | |
In file included from /usr/local/include/llvm/IR/Attributes.h:24, | |
from /usr/local/include/llvm/IR/Argument.h:17, | |
from /usr/local/include/llvm/IR/Function.h:25, | |
from /home/user/llvm-pass-tutorial/skeleton/Skeleton.cpp:2: | |
/usr/local/include/llvm/Support/Alignment.h:117:8: note: forward declaration of ‘struct llvm::MaybeAlign’ | |
117 | struct MaybeAlign : public std::optional<Align> { | |
| ^~~~~~~~~~ | |
In file included from /usr/local/include/llvm/IR/Argument.h:17, | |
from /usr/local/include/llvm/IR/Function.h:25, | |
from /home/user/llvm-pass-tutorial/skeleton/Skeleton.cpp:2: | |
/usr/local/include/llvm/IR/Attributes.h: At global scope: | |
/usr/local/include/llvm/IR/Attributes.h:1119:40: error: return type ‘struct llvm::MaybeAlign’ is incomplete | |
1119 | MaybeAlign getStackAlignment() const { | |
| ^ | |
/usr/local/include/llvm/IR/Attributes.h: In member function ‘void llvm::AttrBuilder::getStackAlignment() const’: | |
/usr/local/include/llvm/IR/Attributes.h:1120:23: error: ‘getRawIntAttr’ was not declared in this scope; did you mean ‘addRawIntAttr’? | |
1120 | return MaybeAlign(getRawIntAttr(Attribute::StackAlignment).value_or(0)); | |
| ^~~~~~~~~~~~~ | |
| addRawIntAttr | |
/usr/local/include/llvm/IR/Attributes.h:1120:75: error: invalid use of incomplete type ‘struct llvm::MaybeAlign’ | |
1120 | return MaybeAlign(getRawIntAttr(Attribute::StackAlignment).value_or(0)); | |
| ^ | |
In file included from /usr/local/include/llvm/IR/Attributes.h:24, | |
from /usr/local/include/llvm/IR/Argument.h:17, | |
from /usr/local/include/llvm/IR/Function.h:25, | |
from /home/user/llvm-pass-tutorial/skeleton/Skeleton.cpp:2: | |
/usr/local/include/llvm/Support/Alignment.h:117:8: note: forward declaration of ‘struct llvm::MaybeAlign’ | |
117 | struct MaybeAlign : public std::optional<Align> { | |
| ^~~~~~~~~~ | |
In file included from /usr/local/include/llvm/IR/Argument.h:17, | |
from /usr/local/include/llvm/IR/Function.h:25, | |
from /home/user/llvm-pass-tutorial/skeleton/Skeleton.cpp:2: | |
/usr/local/include/llvm/IR/Attributes.h: In member function ‘uint64_t llvm::AttrBuilder::getDereferenceableBytes() const’: | |
/usr/local/include/llvm/IR/Attributes.h:1126:12: error: ‘getRawIntAttr’ was not declared in this scope; did you mean ‘addRawIntAttr’? | |
1126 | return getRawIntAttr(Attribute::Dereferenceable).value_or(0); | |
| ^~~~~~~~~~~~~ | |
| addRawIntAttr | |
/usr/local/include/llvm/IR/Attributes.h: In member function ‘uint64_t llvm::AttrBuilder::getDereferenceableOrNullBytes() const’: | |
/usr/local/include/llvm/IR/Attributes.h:1132:12: error: ‘getRawIntAttr’ was not declared in this scope; did you mean ‘addRawIntAttr’? | |
1132 | return getRawIntAttr(Attribute::DereferenceableOrNull).value_or(0); | |
| ^~~~~~~~~~~~~ | |
| addRawIntAttr | |
/usr/local/include/llvm/IR/Attributes.h: In member function ‘llvm::AttrBuilder& llvm::AttrBuilder::addAlignmentAttr(unsigned int)’: | |
/usr/local/include/llvm/IR/Attributes.h:1172:45: error: invalid use of incomplete type ‘struct llvm::MaybeAlign’ | |
1172 | return addAlignmentAttr(MaybeAlign(Align)); | |
| ^ | |
In file included from /usr/local/include/llvm/IR/Attributes.h:24, | |
from /usr/local/include/llvm/IR/Argument.h:17, | |
from /usr/local/include/llvm/IR/Function.h:25, | |
from /home/user/llvm-pass-tutorial/skeleton/Skeleton.cpp:2: | |
/usr/local/include/llvm/Support/Alignment.h:117:8: note: forward declaration of ‘struct llvm::MaybeAlign’ | |
117 | struct MaybeAlign : public std::optional<Align> { | |
| ^~~~~~~~~~ | |
In file included from /usr/local/include/llvm/IR/Argument.h:17, | |
from /usr/local/include/llvm/IR/Function.h:25, | |
from /home/user/llvm-pass-tutorial/skeleton/Skeleton.cpp:2: | |
/usr/local/include/llvm/IR/Attributes.h: In member function ‘llvm::AttrBuilder& llvm::AttrBuilder::addStackAlignmentAttr(unsigned int)’: | |
/usr/local/include/llvm/IR/Attributes.h:1184:50: error: invalid use of incomplete type ‘struct llvm::MaybeAlign’ | |
1184 | return addStackAlignmentAttr(MaybeAlign(Align)); | |
| ^ | |
In file included from /usr/local/include/llvm/IR/Attributes.h:24, | |
from /usr/local/include/llvm/IR/Argument.h:17, | |
from /usr/local/include/llvm/IR/Function.h:25, | |
from /home/user/llvm-pass-tutorial/skeleton/Skeleton.cpp:2: | |
/usr/local/include/llvm/Support/Alignment.h:117:8: note: forward declaration of ‘struct llvm::MaybeAlign’ | |
117 | struct MaybeAlign : public std::optional<Align> { | |
| ^~~~~~~~~~ | |
In file included from /usr/local/include/llvm/IR/Metadata.h:27, | |
from /usr/local/include/llvm/IR/TrackingMDRef.h:16, | |
from /usr/local/include/llvm/IR/DebugLoc.h:17, | |
from /usr/local/include/llvm/IR/Instruction.h:21, | |
from /usr/local/include/llvm/IR/BasicBlock.h:22, | |
from /usr/local/include/llvm/IR/Function.h:27, | |
from /home/user/llvm-pass-tutorial/skeleton/Skeleton.cpp:2: | |
/usr/local/include/llvm/IR/LLVMContext.h: At global scope: | |
/usr/local/include/llvm/IR/LLVMContext.h:208:46: error: ‘std::optional’ has not been declared | |
208 | void setDiagnosticsMisExpectTolerance(std::optional<uint32_t> Tolerance); | |
| ^~~~~~~~ | |
/usr/local/include/llvm/IR/LLVMContext.h:208:54: error: expected ‘,’ or ‘...’ before ‘<’ token | |
208 | void setDiagnosticsMisExpectTolerance(std::optional<uint32_t> Tolerance); | |
| ^ | |
/usr/local/include/llvm/IR/LLVMContext.h:225:44: error: ‘std::optional’ has not been declared | |
225 | void setDiagnosticsHotnessThreshold(std::optional<uint64_t> Threshold); | |
| ^~~~~~~~ | |
/usr/local/include/llvm/IR/LLVMContext.h:225:52: error: expected ‘,’ or ‘...’ before ‘<’ token | |
225 | void setDiagnosticsHotnessThreshold(std::optional<uint64_t> Threshold); | |
| ^ | |
In file included from /usr/local/include/llvm/PassAnalysisSupport.h:25, | |
from /usr/local/include/llvm/Pass.h:347, | |
from /home/user/llvm-pass-tutorial/skeleton/Skeleton.cpp:1: | |
/usr/local/include/llvm/ADT/STLExtras.h: In instantiation of ‘struct llvm::TypesAreDistinct<llvm::MetadataAsValue*, llvm::Metadata*>’: | |
/usr/local/include/llvm/ADT/PointerUnion.h:118:22: required from ‘class llvm::PointerUnion<llvm::MetadataAsValue*, llvm::Metadata*>’ | |
/usr/local/include/llvm/IR/Metadata.h:223:60: required from here | |
/usr/local/include/llvm/ADT/STLExtras.h:170:8: error: incomplete type ‘llvm::detail::TypesAreDistinct<llvm::MetadataAsValue*, llvm::Metadata*>’ used in nested name specifier | |
170 | struct TypesAreDistinct | |
| ^~~~~~~~~~~~~~~~ | |
In file included from /usr/local/include/llvm/IR/Metadata.h:21, | |
from /usr/local/include/llvm/IR/TrackingMDRef.h:16, | |
from /usr/local/include/llvm/IR/DebugLoc.h:17, | |
from /usr/local/include/llvm/IR/Instruction.h:21, | |
from /usr/local/include/llvm/IR/BasicBlock.h:22, | |
from /usr/local/include/llvm/IR/Function.h:27, | |
from /home/user/llvm-pass-tutorial/skeleton/Skeleton.cpp:2: | |
/usr/local/include/llvm/ADT/PointerUnion.h: In instantiation of ‘class llvm::PointerUnion<llvm::MetadataAsValue*, llvm::Metadata*>’: | |
/usr/local/include/llvm/IR/Metadata.h:223:60: required from here | |
/usr/local/include/llvm/ADT/PointerUnion.h:118:22: error: ‘value’ is not a member of ‘llvm::TypesAreDistinct<llvm::MetadataAsValue*, llvm::Metadata*>’ | |
118 | 0, PTs...> { | |
| ^ | |
In file included from /usr/local/include/llvm/PassRegistry.h:19, | |
from /usr/local/include/llvm/PassSupport.h:29, | |
from /usr/local/include/llvm/Pass.h:348, | |
from /home/user/llvm-pass-tutorial/skeleton/Skeleton.cpp:1: | |
/usr/local/include/llvm/ADT/DenseMap.h: In instantiation of ‘class llvm::SmallDenseMap<void*, std::pair<llvm::PointerUnion<llvm::MetadataAsValue*, llvm::Metadata*>, long unsigned int>, 4>’: | |
/usr/local/include/llvm/IR/Metadata.h:289:58: required from here | |
/usr/local/include/llvm/ADT/DenseMap.h:890:30: error: non-constant condition for static assertion | |
890 | static_assert(isPowerOf2_64(InlineBuckets), | |
| ~~~~~~~~~~~~~^~~~~~~~~~~~~~~ | |
/usr/local/include/llvm/ADT/DenseMap.h:890:30: in ‘constexpr’ expansion of ‘llvm::isPowerOf2_64(4)’ | |
/usr/local/include/llvm/ADT/DenseMap.h:890:30: error: ‘constexpr’ call flows off the end of the function | |
In file included from /usr/local/include/llvm/PassAnalysisSupport.h:25, | |
from /usr/local/include/llvm/Pass.h:347, | |
from /home/user/llvm-pass-tutorial/skeleton/Skeleton.cpp:1: | |
/usr/local/include/llvm/ADT/STLExtras.h: In instantiation of ‘struct llvm::TypesAreDistinct<llvm::LLVMContext*, llvm::ReplaceableMetadataImpl*>’: | |
/usr/local/include/llvm/ADT/PointerUnion.h:118:22: required from ‘class llvm::PointerUnion<llvm::LLVMContext*, llvm::ReplaceableMetadataImpl*>’ | |
/usr/local/include/llvm/IR/Metadata.h:843:58: required from here | |
/usr/local/include/llvm/ADT/STLExtras.h:170:8: error: incomplete type ‘llvm::detail::TypesAreDistinct<llvm::LLVMContext*, llvm::ReplaceableMetadataImpl*>’ used in nested name specifier | |
170 | struct TypesAreDistinct | |
| ^~~~~~~~~~~~~~~~ | |
In file included from /usr/local/include/llvm/IR/Metadata.h:21, | |
from /usr/local/include/llvm/IR/TrackingMDRef.h:16, | |
from /usr/local/include/llvm/IR/DebugLoc.h:17, | |
from /usr/local/include/llvm/IR/Instruction.h:21, | |
from /usr/local/include/llvm/IR/BasicBlock.h:22, | |
from /usr/local/include/llvm/IR/Function.h:27, | |
from /home/user/llvm-pass-tutorial/skeleton/Skeleton.cpp:2: | |
/usr/local/include/llvm/ADT/PointerUnion.h: In instantiation of ‘class llvm::PointerUnion<llvm::LLVMContext*, llvm::ReplaceableMetadataImpl*>’: | |
/usr/local/include/llvm/IR/Metadata.h:843:58: required from here | |
/usr/local/include/llvm/ADT/PointerUnion.h:118:22: error: ‘value’ is not a member of ‘llvm::TypesAreDistinct<llvm::LLVMContext*, llvm::ReplaceableMetadataImpl*>’ | |
118 | 0, PTs...> { | |
| ^ | |
In file included from /usr/local/include/llvm/IR/TrackingMDRef.h:16, | |
from /usr/local/include/llvm/IR/DebugLoc.h:17, | |
from /usr/local/include/llvm/IR/Instruction.h:21, | |
from /usr/local/include/llvm/IR/BasicBlock.h:22, | |
from /usr/local/include/llvm/IR/Function.h:27, | |
from /home/user/llvm-pass-tutorial/skeleton/Skeleton.cpp:2: | |
/usr/local/include/llvm/IR/Metadata.h:1058:70: error: ‘nullopt’ is not a member of ‘std’ | |
1058 | ArrayRef<Metadata *> Ops1, ArrayRef<Metadata *> Ops2 = std::nullopt); | |
| ^~~~~~~ | |
In file included from /usr/local/include/llvm/IR/BasicBlock.h:22, | |
from /usr/local/include/llvm/IR/Function.h:27, | |
from /home/user/llvm-pass-tutorial/skeleton/Skeleton.cpp:2: | |
/usr/local/include/llvm/IR/Instruction.h: In member function ‘void llvm::Instruction::dropUnknownNonDebugMetadata()’: | |
/usr/local/include/llvm/IR/Instruction.h:327:45: error: ‘nullopt’ is not a member of ‘std’ | |
327 | return dropUnknownNonDebugMetadata(std::nullopt); | |
| ^~~~~~~ | |
/usr/local/include/llvm/IR/Instruction.h:327:52: error: return-statement with a value, in function returning ‘void’ [-fpermissive] | |
327 | return dropUnknownNonDebugMetadata(std::nullopt); | |
| ^ | |
In file included from /usr/local/include/llvm/IR/Function.h:27, | |
from /home/user/llvm-pass-tutorial/skeleton/Skeleton.cpp:2: | |
/usr/local/include/llvm/IR/BasicBlock.h: At global scope: | |
/usr/local/include/llvm/IR/BasicBlock.h:534:8: error: ‘optional’ in namespace ‘std’ does not name a template type | |
534 | std::optional<uint64_t> getIrrLoopHeaderWeight() const; | |
| ^~~~~~~~ | |
/usr/local/include/llvm/IR/BasicBlock.h:534:3: note: ‘std::optional’ is only available from C++17 onwards | |
534 | std::optional<uint64_t> getIrrLoopHeaderWeight() const; | |
| ^~~ | |
In file included from /usr/local/include/llvm/Support/TypeSize.h:20, | |
from /usr/local/include/llvm/IR/Type.h:22, | |
from /usr/local/include/llvm/IR/DerivedTypes.h:23, | |
from /usr/local/include/llvm/IR/Function.h:29, | |
from /home/user/llvm-pass-tutorial/skeleton/Skeleton.cpp:2: | |
/usr/local/include/llvm/Support/raw_ostream.h:239:38: error: ‘string_view’ in namespace ‘std’ does not name a type | |
239 | raw_ostream &operator<<(const std::string_view &Str) { | |
| ^~~~~~~~~~~ | |
/usr/local/include/llvm/Support/raw_ostream.h:239:33: note: ‘std::string_view’ is only available from C++17 onwards | |
239 | raw_ostream &operator<<(const std::string_view &Str) { | |
| ^~~ | |
/usr/local/include/llvm/Support/raw_ostream.h: In member function ‘llvm::raw_ostream& llvm::raw_ostream::operator<<(const int&)’: | |
/usr/local/include/llvm/Support/raw_ostream.h:240:22: error: request for member ‘data’ in ‘Str’, which is of non-class type ‘const int’ | |
240 | return write(Str.data(), Str.length()); | |
| ^~~~ | |
/usr/local/include/llvm/Support/raw_ostream.h:240:34: error: request for member ‘length’ in ‘Str’, which is of non-class type ‘const int’ | |
240 | return write(Str.data(), Str.length()); | |
| ^~~~~~ | |
/usr/local/include/llvm/Support/raw_ostream.h: At global scope: | |
/usr/local/include/llvm/Support/raw_ostream.h:446:16: error: ‘optional’ in namespace ‘std’ does not name a template type | |
446 | mutable std::optional<bool> HasColors; | |
| ^~~~~~~~ | |
/usr/local/include/llvm/Support/raw_ostream.h:446:11: note: ‘std::optional’ is only available from C++17 onwards | |
446 | mutable std::optional<bool> HasColors; | |
| ^~~ | |
/usr/local/include/llvm/Support/raw_ostream.h:744:47: error: ‘std::nullopt_t’ has not been declared | |
744 | raw_ostream &operator<<(raw_ostream &OS, std::nullopt_t); | |
| ^~~~~~~~~ | |
/usr/local/include/llvm/Support/raw_ostream.h: In function ‘llvm::raw_ostream& llvm::operator<<(llvm::raw_ostream&, const llvm::Optional<T>&)’: | |
/usr/local/include/llvm/Support/raw_ostream.h:752:16: error: ‘nullopt’ is not a member of ‘std’ | |
752 | OS << std::nullopt; | |
| ^~~~~~~ | |
/usr/local/include/llvm/Support/raw_ostream.h: At global scope: | |
/usr/local/include/llvm/Support/raw_ostream.h:758:53: error: ‘optional’ in namespace ‘std’ does not name a template type | |
758 | raw_ostream &operator<<(raw_ostream &OS, const std::optional<T> &O) { | |
| ^~~~~~~~ | |
/usr/local/include/llvm/Support/raw_ostream.h:758:48: note: ‘std::optional’ is only available from C++17 onwards | |
758 | raw_ostream &operator<<(raw_ostream &OS, const std::optional<T> &O) { | |
| ^~~ | |
/usr/local/include/llvm/Support/raw_ostream.h:758:61: error: expected ‘,’ or ‘...’ before ‘<’ token | |
758 | raw_ostream &operator<<(raw_ostream &OS, const std::optional<T> &O) { | |
| ^ | |
/usr/local/include/llvm/Support/raw_ostream.h: In function ‘llvm::raw_ostream& llvm::operator<<(llvm::raw_ostream&, int)’: | |
/usr/local/include/llvm/Support/raw_ostream.h:759:7: error: ‘O’ was not declared in this scope; did you mean ‘OS’? | |
759 | if (O) | |
| ^ | |
| OS | |
/usr/local/include/llvm/Support/raw_ostream.h:762:16: error: ‘nullopt’ is not a member of ‘std’ | |
762 | OS << std::nullopt; | |
| ^~~~~~~ | |
In file included from /usr/local/include/llvm/IR/Function.h:29, | |
from /home/user/llvm-pass-tutorial/skeleton/Skeleton.cpp:2: | |
/usr/local/include/llvm/IR/DerivedTypes.h: At global scope: | |
/usr/local/include/llvm/IR/DerivedTypes.h:245:27: error: ‘are_base_of’ was not declared in this scope | |
245 | static std::enable_if_t<are_base_of<Type, Tys...>::value, StructType *> | |
| ^~~~~~~~~~~ | |
/usr/local/include/llvm/IR/DerivedTypes.h:245:51: error: pack expansion argument for non-pack parameter ‘_Tp’ of alias template ‘template<bool _Cond, class _Tp> using enable_if_t = typename std::enable_if::type’ | |
245 | static std::enable_if_t<are_base_of<Type, Tys...>::value, StructType *> | |
| ^ | |
In file included from /usr/include/c++/9/bits/move.h:55, | |
from /usr/include/c++/9/bits/stl_pair.h:59, | |
from /usr/include/c++/9/bits/stl_algobase.h:64, | |
from /usr/include/c++/9/bits/char_traits.h:39, | |
from /usr/include/c++/9/string:40, | |
from /usr/local/include/llvm/Pass.h:31, | |
from /home/user/llvm-pass-tutorial/skeleton/Skeleton.cpp:1: | |
/usr/include/c++/9/type_traits:2377:24: note: declared here | |
2377 | template<bool _Cond, typename _Tp = void> | |
| ^~~~~~~~ | |
In file included from /usr/local/include/llvm/IR/Function.h:29, | |
from /home/user/llvm-pass-tutorial/skeleton/Skeleton.cpp:2: | |
/usr/local/include/llvm/IR/DerivedTypes.h:245:59: error: expected ‘;’ before ‘,’ token | |
245 | static std::enable_if_t<are_base_of<Type, Tys...>::value, StructType *> | |
| ^ | |
| ; | |
/usr/local/include/llvm/IR/DerivedTypes.h:262:27: error: ‘are_base_of’ was not declared in this scope | |
262 | static std::enable_if_t<are_base_of<Type, Tys...>::value, StructType *> | |
| ^~~~~~~~~~~ | |
/usr/local/include/llvm/IR/DerivedTypes.h:262:51: error: pack expansion argument for non-pack parameter ‘_Tp’ of alias template ‘template<bool _Cond, class _Tp> using enable_if_t = typename std::enable_if::type’ | |
262 | static std::enable_if_t<are_base_of<Type, Tys...>::value, StructType *> | |
| ^ | |
In file included from /usr/include/c++/9/bits/move.h:55, | |
from /usr/include/c++/9/bits/stl_pair.h:59, | |
from /usr/include/c++/9/bits/stl_algobase.h:64, | |
from /usr/include/c++/9/bits/char_traits.h:39, | |
from /usr/include/c++/9/string:40, | |
from /usr/local/include/llvm/Pass.h:31, | |
from /home/user/llvm-pass-tutorial/skeleton/Skeleton.cpp:1: | |
/usr/include/c++/9/type_traits:2377:24: note: declared here | |
2377 | template<bool _Cond, typename _Tp = void> | |
| ^~~~~~~~ | |
In file included from /usr/local/include/llvm/IR/Function.h:29, | |
from /home/user/llvm-pass-tutorial/skeleton/Skeleton.cpp:2: | |
/usr/local/include/llvm/IR/DerivedTypes.h:262:59: error: expected ‘;’ before ‘,’ token | |
262 | static std::enable_if_t<are_base_of<Type, Tys...>::value, StructType *> | |
| ^ | |
| ; | |
/usr/local/include/llvm/IR/DerivedTypes.h:267:3: error: redeclaration of ‘template<class ... Tys> int llvm::StructType::value<Tys ...>’ | |
267 | } | |
| ^ | |
/usr/local/include/llvm/IR/DerivedTypes.h:245:54: note: previous declaration ‘template<class ... Tys> int llvm::StructType::value<Tys ...>’ | |
245 | static std::enable_if_t<are_base_of<Type, Tys...>::value, StructType *> | |
| ^~~~~ | |
/usr/local/include/llvm/IR/DerivedTypes.h:305:20: error: ‘are_base_of’ was not declared in this scope | |
305 | std::enable_if_t<are_base_of<Type, Tys...>::value, void> | |
| ^~~~~~~~~~~ | |
/usr/local/include/llvm/IR/DerivedTypes.h:305:44: error: pack expansion argument for non-pack parameter ‘_Tp’ of alias template ‘template<bool _Cond, class _Tp> using enable_if_t = typename std::enable_if::type’ | |
305 | std::enable_if_t<are_base_of<Type, Tys...>::value, void> | |
| ^ | |
In file included from /usr/include/c++/9/bits/move.h:55, | |
from /usr/include/c++/9/bits/stl_pair.h:59, | |
from /usr/include/c++/9/bits/stl_algobase.h:64, | |
from /usr/include/c++/9/bits/char_traits.h:39, | |
from /usr/include/c++/9/string:40, | |
from /usr/local/include/llvm/Pass.h:31, | |
from /home/user/llvm-pass-tutorial/skeleton/Skeleton.cpp:1: | |
/usr/include/c++/9/type_traits:2377:24: note: declared here | |
2377 | template<bool _Cond, typename _Tp = void> | |
| ^~~~~~~~ | |
In file included from /usr/local/include/llvm/IR/Function.h:29, | |
from /home/user/llvm-pass-tutorial/skeleton/Skeleton.cpp:2: | |
/usr/local/include/llvm/IR/DerivedTypes.h:305:52: error: expected ‘;’ before ‘,’ token | |
305 | std::enable_if_t<are_base_of<Type, Tys...>::value, void> | |
| ^ | |
| ; | |
/usr/local/include/llvm/IR/DerivedTypes.h:309:3: error: data member ‘value’ cannot be a member template | |
309 | } | |
| ^ | |
In file included from /usr/local/include/llvm/IR/GlobalObject.h:18, | |
from /usr/local/include/llvm/IR/Function.h:30, | |
from /home/user/llvm-pass-tutorial/skeleton/Skeleton.cpp:2: | |
/usr/local/include/llvm/IR/GlobalValue.h:642:8: error: ‘optional’ in namespace ‘std’ does not name a template type | |
642 | std::optional<ConstantRange> getAbsoluteSymbolRange() const; | |
| ^~~~~~~~ | |
/usr/local/include/llvm/IR/GlobalValue.h:642:3: note: ‘std::optional’ is only available from C++17 onwards | |
642 | std::optional<ConstantRange> getAbsoluteSymbolRange() const; | |
| ^~~ | |
In file included from /usr/local/include/llvm/IR/Function.h:30, | |
from /home/user/llvm-pass-tutorial/skeleton/Skeleton.cpp:2: | |
/usr/local/include/llvm/IR/GlobalObject.h: In member function ‘uint64_t llvm::GlobalObject::getAlignment() const’: | |
/usr/local/include/llvm/IR/GlobalObject.h:71:16: error: variable ‘llvm::MaybeAlign Align’ has initializer but incomplete type | |
71 | MaybeAlign Align = getAlign(); | |
| ^~~~~ | |
/usr/local/include/llvm/IR/GlobalObject.h:71:33: error: invalid use of incomplete type ‘struct llvm::MaybeAlign’ | |
71 | MaybeAlign Align = getAlign(); | |
| ^ | |
In file included from /usr/local/include/llvm/IR/Attributes.h:24, | |
from /usr/local/include/llvm/IR/Argument.h:17, | |
from /usr/local/include/llvm/IR/Function.h:25, | |
from /home/user/llvm-pass-tutorial/skeleton/Skeleton.cpp:2: | |
/usr/local/include/llvm/Support/Alignment.h:117:8: note: forward declaration of ‘struct llvm::MaybeAlign’ | |
117 | struct MaybeAlign : public std::optional<Align> { | |
| ^~~~~~~~~~ | |
In file included from /usr/local/include/llvm/IR/Function.h:30, | |
from /home/user/llvm-pass-tutorial/skeleton/Skeleton.cpp:2: | |
/usr/local/include/llvm/IR/GlobalObject.h: At global scope: | |
/usr/local/include/llvm/IR/GlobalObject.h:79:31: error: return type ‘struct llvm::MaybeAlign’ is incomplete | |
79 | MaybeAlign getAlign() const { | |
| ^ | |
/usr/local/include/llvm/IR/GlobalObject.h: In member function ‘void llvm::GlobalObject::getAlign() const’: | |
/usr/local/include/llvm/IR/GlobalObject.h:82:12: error: ‘decodeMaybeAlign’ was not declared in this scope | |
82 | return decodeMaybeAlign(AlignmentData); | |
| ^~~~~~~~~~~~~~~~ | |
In file included from /home/user/llvm-pass-tutorial/skeleton/Skeleton.cpp:2: | |
/usr/local/include/llvm/IR/Function.h: At global scope: | |
/usr/local/include/llvm/IR/Function.h:283:8: error: ‘optional’ in namespace ‘std’ does not name a template type | |
283 | std::optional<ProfileCount> getEntryCount(bool AllowSynthetic = false) const; | |
| ^~~~~~~~ | |
/usr/local/include/llvm/IR/Function.h:283:3: note: ‘std::optional’ is only available from C++17 onwards | |
283 | std::optional<ProfileCount> getEntryCount(bool AllowSynthetic = false) const; | |
| ^~~ | |
/usr/local/include/llvm/IR/Function.h:302:8: error: ‘optional’ in namespace ‘std’ does not name a template type | |
302 | std::optional<StringRef> getSectionPrefix() const; | |
| ^~~~~~~~ | |
/usr/local/include/llvm/IR/Function.h:302:3: note: ‘std::optional’ is only available from C++17 onwards | |
302 | std::optional<StringRef> getSectionPrefix() const; | |
| ^~~ | |
/usr/local/include/llvm/IR/Function.h: In member function ‘bool llvm::Function::hasProfileData(bool) const’: | |
/usr/local/include/llvm/IR/Function.h:291:12: error: ‘getEntryCount’ was not declared in this scope; did you mean ‘setEntryCount’? | |
291 | return getEntryCount(IncludeSynthetic).has_value(); | |
| ^~~~~~~~~~~~~ | |
| setEntryCount | |
/usr/local/include/llvm/IR/Function.h: At global scope: | |
/usr/local/include/llvm/IR/Function.h:426:38: error: return type ‘struct llvm::MaybeAlign’ is incomplete | |
426 | MaybeAlign getFnStackAlign() const { | |
| ^ | |
/usr/local/include/llvm/IR/Function.h: In member function ‘void llvm::Function::getFnStackAlign() const’: | |
/usr/local/include/llvm/IR/Function.h:427:46: error: invalid use of incomplete type ‘struct llvm::MaybeAlign’ | |
427 | return AttributeSets.getFnStackAlignment(); | |
| ^ | |
In file included from /usr/local/include/llvm/IR/Attributes.h:24, | |
from /usr/local/include/llvm/IR/Argument.h:17, | |
from /usr/local/include/llvm/IR/Function.h:25, | |
from /home/user/llvm-pass-tutorial/skeleton/Skeleton.cpp:2: | |
/usr/local/include/llvm/Support/Alignment.h:117:8: note: forward declaration of ‘struct llvm::MaybeAlign’ | |
117 | struct MaybeAlign : public std::optional<Align> { | |
| ^~~~~~~~~~ | |
In file included from /home/user/llvm-pass-tutorial/skeleton/Skeleton.cpp:2: | |
/usr/local/include/llvm/IR/Function.h: In member function ‘uint64_t llvm::Function::getParamAlignment(unsigned int) const’: | |
/usr/local/include/llvm/IR/Function.h:445:44: error: invalid use of incomplete type ‘struct llvm::MaybeAlign’ | |
445 | if (const auto MA = getParamAlign(ArgNo)) | |
| ^ | |
In file included from /usr/local/include/llvm/IR/Attributes.h:24, | |
from /usr/local/include/llvm/IR/Argument.h:17, | |
from /usr/local/include/llvm/IR/Function.h:25, | |
from /home/user/llvm-pass-tutorial/skeleton/Skeleton.cpp:2: | |
/usr/local/include/llvm/Support/Alignment.h:117:8: note: forward declaration of ‘struct llvm::MaybeAlign’ | |
117 | struct MaybeAlign : public std::optional<Align> { | |
| ^~~~~~~~~~ | |
In file included from /home/user/llvm-pass-tutorial/skeleton/Skeleton.cpp:2: | |
/usr/local/include/llvm/IR/Function.h: At global scope: | |
/usr/local/include/llvm/IR/Function.h:450:50: error: return type ‘struct llvm::MaybeAlign’ is incomplete | |
450 | MaybeAlign getParamAlign(unsigned ArgNo) const { | |
| ^ | |
/usr/local/include/llvm/IR/Function.h: In member function ‘void llvm::Function::getParamAlign(unsigned int) const’: | |
/usr/local/include/llvm/IR/Function.h:451:49: error: invalid use of incomplete type ‘struct llvm::MaybeAlign’ | |
451 | return AttributeSets.getParamAlignment(ArgNo); | |
| ^ | |
In file included from /usr/local/include/llvm/IR/Attributes.h:24, | |
from /usr/local/include/llvm/IR/Argument.h:17, | |
from /usr/local/include/llvm/IR/Function.h:25, | |
from /home/user/llvm-pass-tutorial/skeleton/Skeleton.cpp:2: | |
/usr/local/include/llvm/Support/Alignment.h:117:8: note: forward declaration of ‘struct llvm::MaybeAlign’ | |
117 | struct MaybeAlign : public std::optional<Align> { | |
| ^~~~~~~~~~ | |
In file included from /home/user/llvm-pass-tutorial/skeleton/Skeleton.cpp:2: | |
/usr/local/include/llvm/IR/Function.h: At global scope: | |
/usr/local/include/llvm/IR/Function.h:454:55: error: return type ‘struct llvm::MaybeAlign’ is incomplete | |
454 | MaybeAlign getParamStackAlign(unsigned ArgNo) const { | |
| ^ | |
/usr/local/include/llvm/IR/Function.h: In member function ‘void llvm::Function::getParamStackAlign(unsigned int) const’: | |
/usr/local/include/llvm/IR/Function.h:455:54: error: invalid use of incomplete type ‘struct llvm::MaybeAlign’ | |
455 | return AttributeSets.getParamStackAlignment(ArgNo); | |
| ^ | |
In file included from /usr/local/include/llvm/IR/Attributes.h:24, | |
from /usr/local/include/llvm/IR/Argument.h:17, | |
from /usr/local/include/llvm/IR/Function.h:25, | |
from /home/user/llvm-pass-tutorial/skeleton/Skeleton.cpp:2: | |
/usr/local/include/llvm/Support/Alignment.h:117:8: note: forward declaration of ‘struct llvm::MaybeAlign’ | |
117 | struct MaybeAlign : public std::optional<Align> { | |
| ^~~~~~~~~~ | |
/home/user/llvm-pass-tutorial/skeleton/Skeleton.cpp: At global scope: | |
/home/user/llvm-pass-tutorial/skeleton/Skeleton.cpp:28:8: error: ‘RegisterStandardPasses’ does not name a type | |
28 | static RegisterStandardPasses | |
| ^~~~~~~~~~~~~~~~~~~~~~ | |
make[2]: *** [skeleton/CMakeFiles/SkeletonPass.dir/build.make:63: skeleton/CMakeFiles/SkeletonPass.dir/Skeleton.cpp.o] Error 1 | |
make[1]: *** [CMakeFiles/Makefile2:178: skeleton/CMakeFiles/SkeletonPass.dir/all] Error 2 | |
make: *** [Makefile:84: all] Error 2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment