1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00

Fix a memory leak and a cross module reference.

llvm-svn: 325712
This commit is contained in:
Rafael Espindola 2018-02-21 19:55:11 +00:00
parent 145c2ec14c
commit ae3e4b7515

View File

@ -438,7 +438,7 @@ struct FunCloner {
LLVMBasicBlockRef ElseBB = DeclareBB(LLVMValueAsBasicBlock(Else));
LLVMValueRef Then = LLVMGetOperand(Src, 2);
LLVMBasicBlockRef ThenBB = DeclareBB(LLVMValueAsBasicBlock(Then));
Dst = LLVMBuildCondBr(Builder, Cond, ThenBB, ElseBB);
Dst = LLVMBuildCondBr(Builder, CloneValue(Cond), ThenBB, ElseBB);
break;
}
case LLVMSwitch:
@ -949,6 +949,7 @@ int llvm_echo(void) {
fputs(Str, stdout);
LLVMDisposeMessage(Str);
LLVMDisposeModule(Src);
LLVMDisposeModule(M);
LLVMContextDispose(Ctx);