diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-10-21 19:05:03 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-10-21 19:05:03 +0000 |
commit | fd4ced2c5200879d337a52799f076456817e5095 (patch) | |
tree | ddef1458004abdf6d8265b1ebe39f7c8326f3218 /llvm/lib/CodeGen/RegisterCoalescer.cpp | |
parent | 56ac1811899d623f355cea6a4eabf93e9f23b780 (diff) | |
download | bcm5719-llvm-fd4ced2c5200879d337a52799f076456817e5095.tar.gz bcm5719-llvm-fd4ced2c5200879d337a52799f076456817e5095.zip |
Don't crash when the Assignments vector is empty.
Reported by Vincent Lejeune using an out-of-tree target.
llvm-svn: 166398
Diffstat (limited to 'llvm/lib/CodeGen/RegisterCoalescer.cpp')
-rw-r--r-- | llvm/lib/CodeGen/RegisterCoalescer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/RegisterCoalescer.cpp b/llvm/lib/CodeGen/RegisterCoalescer.cpp index ba6b4569a8f..2ca67d63257 100644 --- a/llvm/lib/CodeGen/RegisterCoalescer.cpp +++ b/llvm/lib/CodeGen/RegisterCoalescer.cpp @@ -1302,7 +1302,7 @@ public: SmallVectorImpl<unsigned> &ShrinkRegs); /// Get the value assignments suitable for passing to LiveInterval::join. - const int *getAssignments() const { return &Assignments[0]; } + const int *getAssignments() const { return Assignments.data(); } }; } // end anonymous namespace |