1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-18 18:42:46 +02:00
llvm-mirror/unittests
James Y Knight 846be29e5e [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

llvm-svn: 352827
2019-02-01 02:28:03 +00:00
..
ADT Revert r351954 "Add a value_type to ArrayRef." 2019-01-25 15:25:52 +00:00
Analysis [opaque pointer types] Add a FunctionCallee wrapper type, and use it. 2019-02-01 02:28:03 +00:00
AsmParser Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
BinaryFormat Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Bitcode Replace llvm::isPodLike<...> by llvm::is_trivially_copyable<...> 2019-01-20 21:19:56 +00:00
CodeGen GlobalISel: Allow bitcount ops to have different result type 2019-01-31 02:09:57 +00:00
DebugInfo Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Demangle Update more file headers across all of the LLVM projects in the monorepo 2019-01-19 10:56:40 +00:00
ExecutionEngine Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
FuzzMutate Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
IR [opaque pointer types] Add a FunctionCallee wrapper type, and use it. 2019-02-01 02:28:03 +00:00
LineEditor Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Linker Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MC Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MI MachineModuleInfo: Store more specific reference to LLVMTargetMachine; NFC 2018-11-05 23:49:13 +00:00
Object Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ObjectYAML Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Option Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
OptRemarks Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Passes Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ProfileData Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Support [CommandLine] Improve help text for cl::values style options 2019-01-31 13:58:48 +00:00
Target [WebAssembly] Exception handling: Switch to the new proposal 2019-01-30 03:21:57 +00:00
TextAPI Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
tools Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Transforms [LV][VPlan] Change to implement VPlan based predication for 2019-01-23 22:43:12 +00:00
XRay Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
CMakeLists.txt [llvm-tapi] initial commit, supports ELF text stubs 2018-12-03 19:30:52 +00:00
unittest.cfg.in Add support for unittest inputs. 2018-09-05 23:30:17 +00:00