[cfi] CFI-ICall for ThinLTO.
Implement ControlFlowIntegrity for indirect function calls in ThinLTO. Design follows the RFC in llvm-dev, see https://groups.google.com/d/msg/llvm-dev/MgUlaphu4Qc/kywu0AqjAQAJ llvm-svn: 305533
This commit is contained in:
@@ -5252,6 +5252,18 @@ Error ModuleSummaryIndexBitcodeReader::parseEntireSummary(unsigned ID) {
|
||||
{{Record[0], Record[1]}, {Record.begin() + 2, Record.end()}});
|
||||
break;
|
||||
}
|
||||
case bitc::FS_CFI_FUNCTION_DEFS: {
|
||||
std::set<std::string> &CfiFunctionDefs = TheIndex.cfiFunctionDefs();
|
||||
for (unsigned I = 0; I != Record.size(); I += 2)
|
||||
CfiFunctionDefs.insert({Strtab.data() + Record[I], Record[I+1]});
|
||||
break;
|
||||
}
|
||||
case bitc::FS_CFI_FUNCTION_DECLS: {
|
||||
std::set<std::string> &CfiFunctionDecls = TheIndex.cfiFunctionDecls();
|
||||
for (unsigned I = 0; I != Record.size(); I += 2)
|
||||
CfiFunctionDecls.insert({Strtab.data() + Record[I], Record[I+1]});
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
llvm_unreachable("Exit infinite loop");
|
||||
|
||||
Reference in New Issue
Block a user