summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineVerifier.cpp
diff options
context:
space:
mode:
authorSean Callanan <scallanan@apple.com>2012-02-10 01:22:05 +0000
committerSean Callanan <scallanan@apple.com>2012-02-10 01:22:05 +0000
commit933693b6218327d9c2c75b86061f6808fdb4cdc0 (patch)
tree993701b34df0ef4b796e78d667f6f07c9a75f7cf /llvm/lib/CodeGen/MachineVerifier.cpp
parente963fd51a84731bf1dfa4a2d757b3459dd7cfeb5 (diff)
downloadbcm5719-llvm-933693b6218327d9c2c75b86061f6808fdb4cdc0.tar.gz
bcm5719-llvm-933693b6218327d9c2c75b86061f6808fdb4cdc0.zip
Fixed a bunch of ownership problems with the expression
parser. Specifically: - ClangUserExpression now keeps weak pointers to the structures it needs and then locks them when needed. This ensures that they continue to be valid without leaking memory if the ClangUserExpression is long lived. - ClangExpressionDeclMap, instead of keeping a pointer to an ExecutionContext, now contains an ExecutionContext. This prevents bugs if the pointer or its contents somehow become stale. It also no longer requires that ExecutionContexts be passed into any function except its initialization function, since it can count on the ExecutionContext still being around. There's a lot of room for improvement (specifically, ClangExpressionDeclMap should also use weak pointers insetad of shared pointers) but this is an important first step that codifies assumptions that already existed in the code. llvm-svn: 150217
Diffstat (limited to 'llvm/lib/CodeGen/MachineVerifier.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud