OrcV2 is more strict with linkage.
When we compile incremental inputs we store each input in a separate llvm::Module. In order to preserve the semantics, we make all symbols from each module with external linkage, that is, accessible from other modules. This model works well for almost all symbols, except for the clang-generated ones which have the same name. For example clang stores strings in variables `.strN` which may clash accross modules. Luckily, these strings are used within a single module and thus we can avoid the JIT error by keeping them with their non-external linkage.
This commit is contained in:
parent
7b27b283f9
commit
357a4c8377
@ -43,6 +43,8 @@ namespace {
|
||||
if (GV.isDeclaration())
|
||||
return false; // no change.
|
||||
|
||||
if (GV.getName().startswith(".str"))
|
||||
return false;
|
||||
// GV is a definition.
|
||||
|
||||
llvm::GlobalValue::LinkageTypes LT = GV.getLinkage();
|
||||
|
Loading…
Reference in New Issue
Block a user