Avoid calling getTypeSlot more
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9077 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Bytecode/Reader/ConstantReader.cpp b/lib/Bytecode/Reader/ConstantReader.cpp
index 2689362..71afaf6 100644
--- a/lib/Bytecode/Reader/ConstantReader.cpp
+++ b/lib/Bytecode/Reader/ConstantReader.cpp
@@ -350,7 +350,7 @@
Constant *C = parseConstantValue(Buf, EndBuf, Ty);
assert(C && "parseConstantValue returned NULL!");
BCR_TRACE(4, "Read Constant: '" << *C << "'\n");
- unsigned Slot = insertValue(C, Tab);
+ unsigned Slot = insertValue(C, Typ, Tab);
// If we are reading a function constant table, make sure that we adjust
// the slot number to be the real global constant number.