diff options
author | Reid Kleckner <rnk@google.com> | 2016-08-30 21:48:14 +0000 |
---|---|---|
committer | Reid Kleckner <rnk@google.com> | 2016-08-30 21:48:14 +0000 |
commit | dbaa61cbe36fb6178382cb1a3eb636ebb516bc1d (patch) | |
tree | d81b4a3ac51bbe5f9835b5529c137ad973e41b00 /llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp | |
parent | 36865d6abff5314178b29e15b9f9f98509221ae4 (diff) | |
download | llvm-dbaa61cbe36fb6178382cb1a3eb636ebb516bc1d.zip llvm-dbaa61cbe36fb6178382cb1a3eb636ebb516bc1d.tar.gz llvm-dbaa61cbe36fb6178382cb1a3eb636ebb516bc1d.tar.bz2 |
[codeview] Remove redundant TypeTable lookup
As written, the code should assert if this lookup would have ever
succeeded. Without looking through composite types, the type graph
should be acyclic.
llvm-svn: 280168
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp index 9e5b8c5..e30864e 100644 --- a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp @@ -1137,13 +1137,6 @@ TypeIndex CodeViewDebug::lowerTypeBasic(const DIBasicType *Ty) { TypeIndex CodeViewDebug::lowerTypePointer(const DIDerivedType *Ty) { TypeIndex PointeeTI = getTypeIndex(Ty->getBaseType()); - // While processing the type being pointed to it is possible we already - // created this pointer type. If so, we check here and return the existing - // pointer type. - auto I = TypeIndices.find({Ty, nullptr}); - if (I != TypeIndices.end()) - return I->second; - // Pointers to simple types can use SimpleTypeMode, rather than having a // dedicated pointer type record. if (PointeeTI.isSimple() && @@ -1264,16 +1257,7 @@ TypeIndex CodeViewDebug::lowerTypeModifier(const DIDerivedType *Ty) { BaseTy = cast<DIDerivedType>(BaseTy)->getBaseType().resolve(); } TypeIndex ModifiedTI = getTypeIndex(BaseTy); - - // While processing the type being pointed to, it is possible we already - // created this modifier type. If so, we check here and return the existing - // modifier type. - auto I = TypeIndices.find({Ty, nullptr}); - if (I != TypeIndices.end()) - return I->second; - - ModifierRecord MR(ModifiedTI, Mods); - return TypeTable.writeKnownType(MR); + return TypeTable.writeKnownType(ModifierRecord(ModifiedTI, Mods)); } TypeIndex CodeViewDebug::lowerTypeFunction(const DISubroutineType *Ty) { |