diff options
| author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2016-08-25 00:25:10 +0000 |
|---|---|---|
| committer | Matt Arsenault <Matthew.Arsenault@amd.com> | 2016-08-25 00:25:10 +0000 |
| commit | 7ef7e6aacd5446118cb284244f80a7cbc3faa241 (patch) | |
| tree | 2781c72fef545909fe199f5a0fc97ab9f7945782 /libclc/utils | |
| parent | 72ae62c1c0cb31e6478b73fcf241d1fab0485ccb (diff) | |
| download | bcm5719-llvm-7ef7e6aacd5446118cb284244f80a7cbc3faa241.tar.gz bcm5719-llvm-7ef7e6aacd5446118cb284244f80a7cbc3faa241.zip | |
Strip opencl.ocl.version metadata
This should be uniqued when linking, but right now it creates
a lot of metadata spam listing the same version. This should also
probably be reporting the compiled version of the user program,
which may differ from the library. Currently the library IR files report
1.0 while 1.1/1.2 are the default for user programs.
llvm-svn: 279692
Diffstat (limited to 'libclc/utils')
| -rw-r--r-- | libclc/utils/prepare-builtins.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libclc/utils/prepare-builtins.cpp b/libclc/utils/prepare-builtins.cpp index 3122f485b6e..887067294ea 100644 --- a/libclc/utils/prepare-builtins.cpp +++ b/libclc/utils/prepare-builtins.cpp @@ -57,6 +57,13 @@ int main(int argc, char **argv) { return 1; } + // Strip the OpenCL version metadata. There are a lot of linked + // modules in the library build, each spamming the same + // version. This may also report a different version than the user + // program is using. This should probably be uniqued when linking. + if (NamedMDNode *OCLVersion = M->getNamedMetadata("opencl.ocl.version")) + M->eraseNamedMetadata(OCLVersion); + // Set linkage of every external definition to linkonce_odr. for (Module::iterator i = M->begin(), e = M->end(); i != e; ++i) { if (!i->isDeclaration() && i->getLinkage() == GlobalValue::ExternalLinkage) |

