aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Basic/FileManager.cpp
diff options
context:
space:
mode:
authorXun Li <xun@fb.com>2020-12-02 16:49:12 -0800
committerXun Li <xun@fb.com>2020-12-02 16:49:12 -0800
commit80b0f74c8c539b2385f897467aa99b2b6b298c04 (patch)
tree0a87c6ce8aa3f04b16ca7ff345ec79400b0464c2 /clang/lib/Basic/FileManager.cpp
parent55f8c2fdfbc5eda1be946e97ecffa2dea44a883e (diff)
downloadllvm-80b0f74c8c539b2385f897467aa99b2b6b298c04.zip
llvm-80b0f74c8c539b2385f897467aa99b2b6b298c04.tar.gz
llvm-80b0f74c8c539b2385f897467aa99b2b6b298c04.tar.bz2
Small improvements to Intrinsic::getName
While I was adding a new intrinsic instruction (not overloaded), I accidentally used CreateUnaryIntrinsic to create the intrinsics, which turns out to be passing the type list to getName, and ended up naming the intrinsics function with type suffix, which leads to wierd bugs latter on. It took me a long time to debug. It seems a good idea to add an assertion in getName so that it fails if types are passed but it's not a overloaded function. Also, the overloade version of getName is less efficient because it creates an std::string. We should avoid calling it if we know that there are no types provided. Differential Revision: https://reviews.llvm.org/D92523
Diffstat (limited to 'clang/lib/Basic/FileManager.cpp')
0 files changed, 0 insertions, 0 deletions