From 8ab55b747d03f278c7cbed6ddb5b1378b97281f8 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 28 Feb 2009 23:01:30 +0000 Subject: [PATCH] make this work when constructed with a null module* git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65733 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/VMCore/AsmWriter.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/VMCore/AsmWriter.cpp b/lib/VMCore/AsmWriter.cpp index 4128fdb6e84..854c3ba7ccb 100644 --- a/lib/VMCore/AsmWriter.cpp +++ b/lib/VMCore/AsmWriter.cpp @@ -146,9 +146,8 @@ void TypePrinting::clear() { } TypePrinting::TypePrinting(const Module *M) { - if (M == 0) return; - TypeNames = new std::map(); + if (M == 0) return; // If the module has a symbol table, take all global types and stuff their // names into the TypeNames map.