diff options
| author | Benjamin Kramer <benny.kra@googlemail.com> | 2014-03-07 14:42:25 +0000 |
|---|---|---|
| committer | Benjamin Kramer <benny.kra@googlemail.com> | 2014-03-07 14:42:25 +0000 |
| commit | f04ddd01c9d805507868da00a71c80d0fd355256 (patch) | |
| tree | fc85ade2b098f1ef592fab4c00b972302b99908b /llvm/unittests/Support | |
| parent | ed2f476b2039443d947eafff3b199005468e7e7e (diff) | |
| download | bcm5719-llvm-f04ddd01c9d805507868da00a71c80d0fd355256.tar.gz bcm5719-llvm-f04ddd01c9d805507868da00a71c80d0fd355256.zip | |
[C++11] Replace LLVM-style type traits with C++11 standard ones.
No functionality change.
llvm-svn: 203242
Diffstat (limited to 'llvm/unittests/Support')
| -rw-r--r-- | llvm/unittests/Support/Casting.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/llvm/unittests/Support/Casting.cpp b/llvm/unittests/Support/Casting.cpp index 04451788951..228c90bb8b7 100644 --- a/llvm/unittests/Support/Casting.cpp +++ b/llvm/unittests/Support/Casting.cpp @@ -77,12 +77,16 @@ using namespace llvm; // Test the peculiar behavior of Use in simplify_type. -int Check1[is_same<simplify_type<Use>::SimpleType, Value *>::value ? 1 : -1]; -int Check2[is_same<simplify_type<Use *>::SimpleType, Value *>::value ? 1 : -1]; +static_assert(std::is_same<simplify_type<Use>::SimpleType, Value *>::value, + "Use doesn't simplify correctly!"); +static_assert(std::is_same<simplify_type<Use *>::SimpleType, Value *>::value, + "Use doesn't simplify correctly!"); // Test that a regular class behaves as expected. -int Check3[is_same<simplify_type<foo>::SimpleType, int>::value ? 1 : -1]; -int Check4[is_same<simplify_type<foo *>::SimpleType, foo *>::value ? 1 : -1]; +static_assert(std::is_same<simplify_type<foo>::SimpleType, int>::value, + "Unexpected simplify_type result!"); +static_assert(std::is_same<simplify_type<foo *>::SimpleType, foo *>::value, + "Unexpected simplify_type result!"); namespace { |

