[X86] Refactor X86IndirectThunks.cpp to Accommodate Mitigations other than Retpoline
authorScott Constable <scott.d.constable@intel.com>
Fri, 3 Apr 2020 04:59:47 +0000 (21:59 -0700)
committerCraig Topper <craig.topper@gmail.com>
Fri, 3 Apr 2020 05:09:54 +0000 (22:09 -0700)
commitb1d581019f5d4d176ad70ddffee13db247a13ef1
treeaf02a532e82b71571a07c6be893dc3ce2f75d1ee
parent0cfdce26ea21ff129003337ab31d32aac4bd3c1a
[X86] Refactor X86IndirectThunks.cpp to Accommodate Mitigations other than Retpoline

Introduce a ThunkInserter CRTP base class from which new thunk types can inherit, e.g., thunks to mitigate https://software.intel.com/security-software-guidance/software-guidance/load-value-injection.

Differential Revision: https://reviews.llvm.org/D76811
llvm/lib/Target/X86/X86IndirectThunks.cpp