diff options
Diffstat (limited to 'llvm/lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp')
-rw-r--r-- | llvm/lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp b/llvm/lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp index 4b36c7b..a7adb74 100644 --- a/llvm/lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp +++ b/llvm/lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp @@ -146,6 +146,14 @@ void promoteTypeIds(Module &M, StringRef ModuleId) { } } + if (Function *TypeCheckedLoadRelativeFunc = M.getFunction( + Intrinsic::getName(Intrinsic::type_checked_load_relative))) { + for (const Use &U : TypeCheckedLoadRelativeFunc->uses()) { + auto CI = cast<CallInst>(U.getUser()); + ExternalizeTypeId(CI, 2); + } + } + for (GlobalObject &GO : M.global_objects()) { SmallVector<MDNode *, 1> MDs; GO.getMetadata(LLVMContext::MD_type, MDs); |