projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d451000
)
Fix UBSan bootstrap: don't bind reference to nullptr.
author
Alexey Samsonov
<vonosmas@gmail.com>
Tue, 23 Dec 2014 04:15:47 +0000
(
04:15
+0000)
committer
Alexey Samsonov
<vonosmas@gmail.com>
Tue, 23 Dec 2014 04:15:47 +0000
(
04:15
+0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224751
91177308
-0d34-0410-b5e6-
96231b3b80d8
include/llvm/CodeGen/RegAllocPBQP.h
patch
|
blob
|
history
diff --git
a/include/llvm/CodeGen/RegAllocPBQP.h
b/include/llvm/CodeGen/RegAllocPBQP.h
index 540af08408816ba9d2a6903cb79ce25698253eb8..3badfe0b240594b95352bed9fc811b24044fdd66 100644
(file)
--- a/
include/llvm/CodeGen/RegAllocPBQP.h
+++ b/
include/llvm/CodeGen/RegAllocPBQP.h
@@
-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