mirror of
https://github.com/intel/llvm.git
synced 2026-01-26 03:56:16 +08:00
7b859ff22cb712061f294346094487ddce7cf032
This code had a homemade RAUW that was incorrect when a user was a constant: instead of calling `replaceUsersWithOnConstant()` it would incorrectly update the operand in-place, invalidating `LLVMContextImpl::ExprConstants`. RAUW does the job better. The ValueHandle that `GVMap` is holding onto needs to be removed first, so this commit also removes each variable from the map on-the-fly. Since deletions from `ExprConstants` use a linear search that compares directly on the pointer value (instead of using the key), there isn't an obvious way to expose this with a testcase. llvm-svn: 215953
…
Languages
LLVM
41.5%
C++
31.7%
C
13%
Assembly
9.1%
MLIR
1.5%
Other
2.8%