]> granicus.if.org Git - clang/commit
Fix some DenseMap use-after-rehash bugs and hoist MethodVFTableLocation
authorReid Kleckner <rnk@google.com>
Mon, 2 Apr 2018 20:00:39 +0000 (20:00 +0000)
committerReid Kleckner <rnk@google.com>
Mon, 2 Apr 2018 20:00:39 +0000 (20:00 +0000)
commitba6d4973fc87567d8433bc47c5cedf546f838281
tree01d8322823410026274aead3eb4743aa76a611d5
parent2c7723b2b6bc98e390dd6b7ed147ce94716054bf
Fix some DenseMap use-after-rehash bugs and hoist MethodVFTableLocation

This re-lands r328845 with fixes for crbug.com/827810.

The initial motiviation was to hoist MethodVFTableLocation to global
scope so it could be forward declared.

In this patch, I noticed that MicrosoftVTableContext uses some risky
patterns. It has methods that return references to data stored in
DenseMaps. I've made some of them return by value for trivial structs
and I've moved some things into separate allocations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@329007 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/AST/Mangle.h
include/clang/AST/VTableBuilder.h
lib/AST/MicrosoftMangle.cpp
lib/AST/VTableBuilder.cpp
lib/CodeGen/CGDebugInfo.cpp
lib/CodeGen/MicrosoftCXXABI.cpp