From 56acf63e35440068935bca999d19a81f76e876d6 Mon Sep 17 00:00:00 2001 From: Jakob Stoklund Olesen Date: Sun, 21 Oct 2012 19:05:03 +0000 Subject: [PATCH] Don't crash when the Assignments vector is empty. Reported by Vincent Lejeune using an out-of-tree target. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166398 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/RegisterCoalescer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/CodeGen/RegisterCoalescer.cpp b/lib/CodeGen/RegisterCoalescer.cpp index ba6b4569a8f..2ca67d63257 100644 --- a/lib/CodeGen/RegisterCoalescer.cpp +++ b/lib/CodeGen/RegisterCoalescer.cpp @@ -1302,7 +1302,7 @@ public: SmallVectorImpl &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