mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-01 18:33:56 +00:00
Fix UBSan bootstrap: don't bind reference to nullptr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224751 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d4510005df
commit
acd25d2481
@ -192,8 +192,10 @@ public:
|
||||
: RS(Other.RS), NumOpts(Other.NumOpts), DeniedOpts(Other.DeniedOpts),
|
||||
OptUnsafeEdges(new unsigned[NumOpts]), VReg(Other.VReg),
|
||||
AllowedRegs(Other.AllowedRegs) {
|
||||
std::copy(&Other.OptUnsafeEdges[0], &Other.OptUnsafeEdges[NumOpts],
|
||||
&OptUnsafeEdges[0]);
|
||||
if (NumOpts > 0) {
|
||||
std::copy(&Other.OptUnsafeEdges[0], &Other.OptUnsafeEdges[NumOpts],
|
||||
&OptUnsafeEdges[0]);
|
||||
}
|
||||
}
|
||||
|
||||
// FIXME: Re-implementing default behavior to work around MSVC. Remove once
|
||||
|
Loading…
x
Reference in New Issue
Block a user