llvm/tools
James Y Knight 9ec60d7d8f [opaque pointer types] Add a FunctionCallee wrapper type, and use it.
Recommit r352791 after tweaking DerivedTypes.h slightly, so that gcc
doesn't choke on it, hopefully.

Original Message:
The FunctionCallee type is effectively a {FunctionType*,Value*} pair,
and is a useful convenience to enable code to continue passing the
result of getOrInsertFunction() through to EmitCall, even once pointer
types lose their pointee-type.

Then:
- update the CallInst/InvokeInst instruction creation functions to
  take a Callee,
- modify getOrInsertFunction to return FunctionCallee, and
- update all callers appropriately.

One area of particular note is the change to the sanitizer
code. Previously, they had been casting the result of
`getOrInsertFunction` to a `Function*` via
`checkSanitizerInterfaceFunction`, and storing that. That would report
an error if someone had already inserted a function declaraction with
a mismatching signature.

However, in general, LLVM allows for such mismatches, as
`getOrInsertFunction` will automatically insert a bitcast if
needed. As part of this cleanup, cause the sanitizer code to do the
same. (It will call its functions using the expected signature,
however they may have been declared.)

Finally, in a small number of locations, callers of
`getOrInsertFunction` actually were expecting/requiring that a brand
new function was being created. In such cases, I've switched them to
Function::Create instead.

Differential Revision: https://reviews.llvm.org/D57315

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@352827 91177308-0d34-0410-b5e6-96231b3b80d8
2019-02-01 02:28:03 +00:00
..
bugpoint [opaque pointer types] Add a FunctionCallee wrapper type, and use it. 2019-02-01 02:28:03 +00:00
bugpoint-passes Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
dsymutil Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
gold Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
llc Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
lli [opaque pointer types] Add a FunctionCallee wrapper type, and use it. 2019-02-01 02:28:03 +00:00
llvm-ar Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
llvm-as Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
llvm-as-fuzzer Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
llvm-bcanalyzer Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
llvm-c-test Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
llvm-cat Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
llvm-cfi-verify Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
llvm-config Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
llvm-cov Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
llvm-cvtres Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
llvm-cxxdump Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
llvm-cxxfilt Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
llvm-cxxmap Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
llvm-diff Replace llvm::isPodLike<...> by llvm::is_trivially_copyable<...> 2019-01-20 21:19:56 +00:00
llvm-dis Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
llvm-dwarfdump Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
llvm-dwp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
llvm-elfabi [elfabi] Add support for reading dynamic symbols from binaries 2019-01-24 22:39:21 +00:00
llvm-exegesis [llvm-exegesis] Add throughput mode. 2019-01-30 16:02:20 +00:00
llvm-extract Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
llvm-go Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
llvm-isel-fuzzer Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
llvm-itanium-demangle-fuzzer Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
llvm-jitlistener Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
llvm-link Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
llvm-lto Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
llvm-lto2 Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
llvm-mc Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
llvm-mc-assemble-fuzzer Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
llvm-mc-disassemble-fuzzer Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
llvm-mca [MC][X86] Correctly model additional operand latency caused by transfer delays from the integer to the floating point unit. 2019-01-23 16:35:07 +00:00
llvm-microsoft-demangle-fuzzer Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
llvm-modextract Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
llvm-mt Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
llvm-nm [llvm-nm] Print out N_COLD_FUNC as "cold func" 2019-01-26 00:33:15 +00:00
llvm-objcopy [llvm-objcopy] Skip --localize-symbol for undefined symbols 2019-01-31 16:45:16 +00:00
llvm-objdump [ELF] Return the section name when calling getSymbolName on a section symbol. 2019-01-31 19:42:21 +00:00
llvm-opt-fuzzer Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
llvm-opt-report Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
llvm-pdbutil [NativePDB] Fix access to both old & new fpo data entries from dbi stream 2019-01-30 10:40:45 +00:00
llvm-profdata Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
llvm-rc Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
llvm-readobj [llvm-readobj] - Few minor cleanups. NFC. 2019-01-30 15:39:05 +00:00
llvm-rtdyld Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
llvm-shlib Revert r351833 and r352250. 2019-01-29 13:43:22 +00:00
llvm-size Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
llvm-special-case-list-fuzzer Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
llvm-split Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
llvm-stress Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
llvm-strings Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
llvm-symbolizer [CommandLine] Improve help text for cl::values style options 2019-01-31 13:58:48 +00:00
llvm-undname Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
llvm-xray Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
llvm-yaml-numeric-parser-fuzzer Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
lto Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
msbuild Fix typos throughout the license files that somehow I and my reviewers 2019-01-21 09:52:34 +00:00
obj2yaml [obj2yaml] - Dump the sh_entsize section field. 2019-01-28 15:05:10 +00:00
opt Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
opt-remarks Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
opt-viewer [opt-viewer] Add javascript to expand/hide full message for multiline remarks. 2019-01-25 17:48:31 +00:00
sancov Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
sanstats Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
verify-uselistorder Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
xcode-toolchain [CMake] Use LLVM_ENABLE_IDE instead of CMAKE_CONFIGURATION_TYPES 2018-10-15 21:20:02 +00:00
yaml2obj Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
CMakeLists.txt Fix most of LLVM's tests with LLVM_ENABLE_PIC=OFF 2019-01-16 20:44:36 +00:00
LLVMBuild.txt Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00