@@ -27,14 +27,14 @@ int32_t add(int32_t X, int32_t Y) { return X + Y; }
27
27
28
28
int32_t mul (int32_t X , int32_t Y ) { return X * Y ; }
29
29
30
- int whitelistedSymbols (LLVMOrcSymbolStringPoolEntryRef Sym , void * Ctx ) {
31
- assert (Ctx && "Cannot call whitelistedSymbols with a null context" );
30
+ int allowedSymbols (LLVMOrcSymbolStringPoolEntryRef Sym , void * Ctx ) {
31
+ assert (Ctx && "Cannot call allowedSymbols with a null context" );
32
32
33
- LLVMOrcSymbolStringPoolEntryRef * Whitelist =
33
+ LLVMOrcSymbolStringPoolEntryRef * AllowList =
34
34
(LLVMOrcSymbolStringPoolEntryRef * )Ctx ;
35
35
36
- // If Sym appears in the whitelist then return true.
37
- LLVMOrcSymbolStringPoolEntryRef * P = Whitelist ;
36
+ // If Sym appears in the allowed list then return true.
37
+ LLVMOrcSymbolStringPoolEntryRef * P = AllowList ;
38
38
while (* P ) {
39
39
if (Sym == * P )
40
40
return 1 ;
@@ -134,11 +134,11 @@ int main(int argc, char *argv[]) {
134
134
}
135
135
}
136
136
137
- // Build a filter to allow JIT'd code to only access whitelisted symbols.
137
+ // Build a filter to allow JIT'd code to only access allowed symbols.
138
138
// This filter is optional: If a null value is suppled for the Filter
139
139
// argument to LLVMOrcCreateDynamicLibrarySearchGeneratorForProcess then
140
140
// all process symbols will be reflected.
141
- LLVMOrcSymbolStringPoolEntryRef Whitelist [] = {
141
+ LLVMOrcSymbolStringPoolEntryRef AllowList [] = {
142
142
LLVMOrcLLJITMangleAndIntern (J , "mul" ),
143
143
LLVMOrcLLJITMangleAndIntern (J , "add" ), 0 };
144
144
@@ -147,7 +147,7 @@ int main(int argc, char *argv[]) {
147
147
LLVMErrorRef Err ;
148
148
if ((Err = LLVMOrcCreateDynamicLibrarySearchGeneratorForProcess (
149
149
& ProcessSymbolsGenerator , LLVMOrcLLJITGetGlobalPrefix (J ),
150
- whitelistedSymbols , Whitelist ))) {
150
+ allowedSymbols , AllowList ))) {
151
151
MainResult = handleError (Err );
152
152
goto jit_cleanup ;
153
153
}
@@ -192,9 +192,9 @@ int main(int argc, char *argv[]) {
192
192
193
193
jit_cleanup :
194
194
// Release all symbol string pool entries that we have allocated. In this
195
- // example that's just our whitelist entries.
195
+ // example that's just our allowed entries.
196
196
{
197
- LLVMOrcSymbolStringPoolEntryRef * P = Whitelist ;
197
+ LLVMOrcSymbolStringPoolEntryRef * P = AllowList ;
198
198
while (* P )
199
199
LLVMOrcReleaseSymbolStringPoolEntry (* P ++ );
200
200
}
0 commit comments