aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Basic/SourceManager.cpp
diff options
context:
space:
mode:
authorRoman Lebedev <lebedev.ri@gmail.com>2020-06-26 22:40:30 +0300
committerRoman Lebedev <lebedev.ri@gmail.com>2020-06-26 22:48:10 +0300
commit64258773ad99b3b6a3eb2a456b79518c1444d9f3 (patch)
treebbbccd237d6d9da7921e2b76cc840557bf73b04f /clang/lib/Basic/SourceManager.cpp
parent8bc62db272448035d60ca9f31ff67040a288063c (diff)
downloadllvm-64258773ad99b3b6a3eb2a456b79518c1444d9f3.zip
llvm-64258773ad99b3b6a3eb2a456b79518c1444d9f3.tar.gz
llvm-64258773ad99b3b6a3eb2a456b79518c1444d9f3.tar.bz2
[CostModel] Avoid traditional ConstantExpr crashy pitfails
I'm not sure if this is a regression from D81448 + D81643, which moved at least the code cast from elsewhere, or somehow no one triggered that before. But now we can reach it with a non-instruction.. It is not straight-forward to write cost-model tests for constantexprs, `-cost-model -analyze -cost-kind=` does not appear to look at them, or maybe i'm doing it wrong. I've encountered that via a SimplifyCFG crash, so reduced (currently-crashing) test is added. There are likely other instances. For now, simply restore previous status quo of not crashing and returning TTI::TCC_Basic.
Diffstat (limited to 'clang/lib/Basic/SourceManager.cpp')
0 files changed, 0 insertions, 0 deletions