diff options
author | Craig Topper <craig.topper@sifive.com> | 2022-10-25 10:18:46 -0700 |
---|---|---|
committer | Craig Topper <craig.topper@sifive.com> | 2022-10-25 10:24:01 -0700 |
commit | 8c42b5e89e1948e3a2ccfa3f09d4360f5eb47833 (patch) | |
tree | b61c83407905b0d193fd9b48b2b43ffb81cffe69 /llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp | |
parent | c49d14aca5c7b06a4f896e9923bdab8a33f2866d (diff) | |
download | llvm-8c42b5e89e1948e3a2ccfa3f09d4360f5eb47833.zip llvm-8c42b5e89e1948e3a2ccfa3f09d4360f5eb47833.tar.gz llvm-8c42b5e89e1948e3a2ccfa3f09d4360f5eb47833.tar.bz2 |
[SelectionDAG] Add missing semicolon after return.
I'm unsure what the code does without the semicolon. On the surface it
seems like the assert below it would be considered part of the if
and thus the assert would only execute if DestReg is 0. But 0 isn't
considered a virtual register so the assert should fail.
Found by PVS Studio.
Reported https://pvs-studio.com/en/blog/posts/cpp/1003/ (N7)
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp b/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp index 48cb768..b1e369d 100644 --- a/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp @@ -451,7 +451,7 @@ void FunctionLoweringInfo::ComputePHILiveOutRegInfo(const PHINode *PN) { Register DestReg = It->second; if (DestReg == 0) - return + return; assert(Register::isVirtualRegister(DestReg) && "Expected a virtual reg"); LiveOutRegInfo.grow(DestReg); LiveOutInfo &DestLOI = LiveOutRegInfo[DestReg]; |