diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2014-05-16 20:05:08 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2014-05-16 20:05:08 +0000 |
commit | 0bf5b143f515ebbccc0d6a3ab8d1ffca3631ee73 (patch) | |
tree | 10e1e681eda35012615c5da60561501778a56e81 /llvm/lib/IR/Value.cpp | |
parent | ec47b2217e4a8d929eb4b2375623f79caf119dee (diff) | |
download | llvm-0bf5b143f515ebbccc0d6a3ab8d1ffca3631ee73.zip llvm-0bf5b143f515ebbccc0d6a3ab8d1ffca3631ee73.tar.gz llvm-0bf5b143f515ebbccc0d6a3ab8d1ffca3631ee73.tar.bz2 |
Fix a warning in builds without asserts.
llvm-svn: 209012
Diffstat (limited to 'llvm/lib/IR/Value.cpp')
-rw-r--r-- | llvm/lib/IR/Value.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/IR/Value.cpp b/llvm/lib/IR/Value.cpp index a3c0286..d734e4e 100644 --- a/llvm/lib/IR/Value.cpp +++ b/llvm/lib/IR/Value.cpp @@ -317,8 +317,7 @@ static GlobalObject &findReplacementForAliasUse(Value &C) { static void replaceAliasUseWith(Use &U, Value *New) { GlobalObject &Replacement = findReplacementForAliasUse(*New); - auto *Old = &cast<GlobalObject>(*U); - assert(Old != &Replacement && + assert(&cast<GlobalObject>(*U) != &Replacement && "replaceAliasUseWith cannot form an alias cycle"); U.set(&Replacement); } |