diff options
author | Jordan Rose <jordan_rose@apple.com> | 2016-07-25 18:34:51 +0000 |
---|---|---|
committer | Jordan Rose <jordan_rose@apple.com> | 2016-07-25 18:34:51 +0000 |
commit | f85a95fdcbfbe22e1cb184171f1861492fe7a9d7 (patch) | |
tree | a074189831143a7ceee0264cfd9d60d3d48adcce /llvm/lib/Transforms/Utils/LCSSA.cpp | |
parent | 40765a62adee1239bca52676c25d25378e04b1d2 (diff) | |
download | bcm5719-llvm-f85a95fdcbfbe22e1cb184171f1861492fe7a9d7.tar.gz bcm5719-llvm-f85a95fdcbfbe22e1cb184171f1861492fe7a9d7.zip |
StringSwitch cannot be copied (take 2).
This prevents StringSwitch from being used with 'auto', which is
important because the inferred type is StringSwitch rather than the
result type. This is a problem because StringSwitch stores addresses
of temporary values rather than copying or moving the value into its
own storage.
This is a compromise that still allows wrapping StringSwitch in other
temporary structures, which (unlike StringSwitch) may be non-trivial
to set up and therefore want to at least be movable. (For an example,
see QueryParser.cpp in clang-tools-extra.)
Changing this uncovered the bug in PassBuilder, also in this patch.
Clang doesn't seem to have any occurrences of the issue.
Re-commit of r276652.
llvm-svn: 276671
Diffstat (limited to 'llvm/lib/Transforms/Utils/LCSSA.cpp')
0 files changed, 0 insertions, 0 deletions