mirror of
https://github.com/intel/llvm.git
synced 2026-01-25 01:07:04 +08:00
Revert "Revert r311468: If --dynamic-list is given, only those symbols are preemptible"
If --dynamic-list is given, only those symbols are preemptible. This allows combining --dynamic-list and version scripts too. The version script controls which symbols are visible, and --dynamic-list controls which of those are preemptible. This fixes pr34053. llvm-svn: 312757
This commit is contained in:
@@ -180,9 +180,22 @@ static ExprValue bitOr(ExprValue A, ExprValue B) {
|
||||
|
||||
void ScriptParser::readDynamicList() {
|
||||
expect("{");
|
||||
readAnonymousDeclaration();
|
||||
if (!atEOF())
|
||||
std::vector<SymbolVersion> Locals;
|
||||
std::vector<SymbolVersion> Globals;
|
||||
std::tie(Locals, Globals) = readSymbols();
|
||||
expect(";");
|
||||
|
||||
if (!atEOF()) {
|
||||
setError("EOF expected, but got " + next());
|
||||
return;
|
||||
}
|
||||
if (!Locals.empty()) {
|
||||
setError("\"local:\" scope not supported in --dynamic-list");
|
||||
return;
|
||||
}
|
||||
|
||||
for (SymbolVersion V : Globals)
|
||||
Config->DynamicList.push_back(V);
|
||||
}
|
||||
|
||||
void ScriptParser::readVersionScript() {
|
||||
|
||||
Reference in New Issue
Block a user