[llvm] r200421 - Make the compile unit map a MapVector so that we can assume a stable
Eric Christopher
echristo at gmail.com
Wed Jan 29 14:06:24 PST 2014
Author: echristo
Date: Wed Jan 29 16:06:23 2014
New Revision: 200421
URL: http://llvm.org/viewvc/llvm-project?rev=200421&view=rev
Log:
Make the compile unit map a MapVector so that we can assume a stable
output ordering.
Modified:
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=200421&r1=200420&r2=200421&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Wed Jan 29 16:06:23 2014
@@ -2880,8 +2880,9 @@ void DwarfDebug::emitDebugRanges() {
unsigned char Size = Asm->getDataLayout().getPointerSize();
// Grab the specific ranges for the compile units in the module.
- for (DenseMap<const MDNode *, DwarfCompileUnit *>::iterator I = CUMap.begin(),
- E = CUMap.end();
+ for (MapVector<const MDNode *, DwarfCompileUnit *>::iterator
+ I = CUMap.begin(),
+ E = CUMap.end();
I != E; ++I) {
DwarfCompileUnit *TheCU = I->second;
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h?rev=200421&r1=200420&r2=200421&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.h Wed Jan 29 16:06:23 2014
@@ -21,6 +21,7 @@
#include "llvm/ADT/SetVector.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/StringMap.h"
+#include "llvm/ADT/MapVector.h"
#include "llvm/CodeGen/AsmPrinter.h"
#include "llvm/CodeGen/LexicalScopes.h"
#include "llvm/DebugInfo.h"
@@ -334,7 +335,7 @@ class DwarfDebug : public AsmPrinterHand
DwarfCompileUnit *FirstCU;
// Maps MDNode with its corresponding DwarfCompileUnit.
- DenseMap<const MDNode *, DwarfCompileUnit *> CUMap;
+ MapVector<const MDNode *, DwarfCompileUnit *> CUMap;
// Maps subprogram MDNode with its corresponding DwarfCompileUnit.
DenseMap<const MDNode *, DwarfCompileUnit *> SPMap;
More information about the llvm-commits
mailing list