diff options
author | Bill Schmidt <wschmidt@linux.vnet.ibm.com> | 2013-08-30 23:25:30 +0000 |
---|---|---|
committer | Bill Schmidt <wschmidt@linux.vnet.ibm.com> | 2013-08-30 23:25:30 +0000 |
commit | 9056dd45a4402cf6266b61f219aa56651633b2c1 (patch) | |
tree | bdcbfe6a21784f2c1c9ad32f3820d7de0dca437d | |
parent | af069a8920098843cda3352c3e2614ff5164e1b7 (diff) | |
download | external_llvm-9056dd45a4402cf6266b61f219aa56651633b2c1.zip external_llvm-9056dd45a4402cf6266b61f219aa56651633b2c1.tar.gz external_llvm-9056dd45a4402cf6266b61f219aa56651633b2c1.tar.bz2 |
Correct partially defined variable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189705 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/PowerPC/PPCFastISel.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Target/PowerPC/PPCFastISel.cpp b/lib/Target/PowerPC/PPCFastISel.cpp index 8a88e76..0276668 100644 --- a/lib/Target/PowerPC/PPCFastISel.cpp +++ b/lib/Target/PowerPC/PPCFastISel.cpp @@ -1294,7 +1294,7 @@ void PPCFastISel::finishCall(MVT RetVT, SmallVectorImpl<unsigned> &UsedRegs, CopyVT = MVT::i64; unsigned SourcePhysReg = VA.getLocReg(); - unsigned ResultReg; + unsigned ResultReg = 0; if (RetVT == CopyVT) { const TargetRegisterClass *CpyRC = TLI.getRegClassFor(CopyVT); @@ -1323,6 +1323,7 @@ void PPCFastISel::finishCall(MVT RetVT, SmallVectorImpl<unsigned> &UsedRegs, .addReg(SourcePhysReg); } + assert(ResultReg && "ResultReg unset!"); UsedRegs.push_back(SourcePhysReg); UpdateValueMap(I, ResultReg); } |