support LLVM trunk after r204934 and zlib commits

This commit is contained in:
Ilia Filippov
2014-04-01 18:48:47 +04:00
parent cc8bae2f2c
commit 114f58bb0b
2 changed files with 6 additions and 2 deletions

View File

@@ -1769,7 +1769,11 @@ std::string CWriter::GetValueName(const llvm::Value *Operand) {
// Resolve potential alias.
if (const llvm::GlobalAlias *GA = llvm::dyn_cast<llvm::GlobalAlias>(Operand)) {
#if defined(LLVM_3_5)
if (const llvm::Value *V = GA->getAliasedGlobal())
#else
if (const llvm::Value *V = GA->resolveAliasedGlobal(false))
#endif
Operand = V;
}