summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/RegisterCoalescer.cpp
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2012-10-21 19:05:03 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2012-10-21 19:05:03 +0000
commitfd4ced2c5200879d337a52799f076456817e5095 (patch)
treeddef1458004abdf6d8265b1ebe39f7c8326f3218 /llvm/lib/CodeGen/RegisterCoalescer.cpp
parent56ac1811899d623f355cea6a4eabf93e9f23b780 (diff)
downloadbcm5719-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.cpp2
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
OpenPOWER on IntegriCloud