This is necessary in order for these symbols to be handled correctly
during LTO.
Details
- Reviewers
tejohnson dexonsmith
Diff Detail
- Repository
- rL LLVM
- Build Status
Buildable 20870 Build 20870: arc lint + arc unit
Event Timeline
llvm/lib/Transforms/Utils/EntryExitInstrumenter.cpp | ||
---|---|---|
23 | Can you include RuntimeLibcalls.def and assert that the name is in that list? |
llvm/lib/Transforms/Utils/EntryExitInstrumenter.cpp | ||
---|---|---|
23 | I could, but I don't think we need to do that unless there's evidence that people are ignoring the comment. |
llvm/lib/Transforms/Utils/EntryExitInstrumenter.cpp | ||
---|---|---|
23 | I'd prefer an assert, because I think it would be easy to miss the comment if the second if block is extended with another func name, or a subsequent new if block is added below it. |
llvm/lib/Transforms/Utils/EntryExitInstrumenter.cpp | ||
---|---|---|
23 | How about just putting a comment in all the places where people are likely to add new code to this function (before ifs, at the end)? |
llvm/lib/Transforms/Utils/EntryExitInstrumenter.cpp | ||
---|---|---|
23 | I suppose another idea is to do something like #define HANDLE_LIBCALL(name, value) const char LibCallName_##name[] = value; #include "llvm/IR/RuntimeLibcalls.def" in a header somewhere, and then change this code to use LibCallName_FOO. |
Needs a test.
llvm/lib/Transforms/Utils/EntryExitInstrumenter.cpp | ||
---|---|---|
23 | Sure that would work too (I was originally envisioning something like what is done in IRSymtab.cpp except assert that IsBuiltinFunc, but your idea is more efficient). Why would it need to be in a header rather than in this file? Better to enforce consistency at compile time if possible IMO. |
Can you include RuntimeLibcalls.def and assert that the name is in that list?