aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-02-28 23:01:30 +0000
committerChris Lattner <sabre@nondot.org>2009-02-28 23:01:30 +0000
commitf7f0c49b2c70c7f70f7c2f0b86cdb2d5ccaac1d1 (patch)
tree5acddb18ad3afb9e1a052f9d6129fca699a18550
parent38f3d08680f9a2276f717867352f814b2d7444ab (diff)
downloadexternal_llvm-f7f0c49b2c70c7f70f7c2f0b86cdb2d5ccaac1d1.zip
external_llvm-f7f0c49b2c70c7f70f7c2f0b86cdb2d5ccaac1d1.tar.gz
external_llvm-f7f0c49b2c70c7f70f7c2f0b86cdb2d5ccaac1d1.tar.bz2
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
-rw-r--r--lib/VMCore/AsmWriter.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/VMCore/AsmWriter.cpp b/lib/VMCore/AsmWriter.cpp
index 4128fdb..854c3ba 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<const Type *, std::string>();
+ if (M == 0) return;
// If the module has a symbol table, take all global types and stuff their
// names into the TypeNames map.