diff options
author | hsmahesha <mahesha.comp@gmail.com> | 2020-03-04 10:53:32 +0530 |
---|---|---|
committer | hsmahesha <mahesha.comp@gmail.com> | 2020-03-04 10:54:26 +0530 |
commit | cac068600e55e489844156d3581b61eeecee7d4e (patch) | |
tree | 4ec6fb5217518f87962b7594ef4b08d6275e1a64 /clang/lib/CodeGen/CodeGenModule.h | |
parent | 952ad4701cf0d8da79789f6b83ddaa386c60d535 (diff) | |
download | llvm-cac068600e55e489844156d3581b61eeecee7d4e.zip llvm-cac068600e55e489844156d3581b61eeecee7d4e.tar.gz llvm-cac068600e55e489844156d3581b61eeecee7d4e.tar.bz2 |
[HIP] Make sure, unused hip-pinned-shadow global var is kept within device code
Summary:
hip-pinned-shadow global var should remain in the final code object irrespective
of whether it is used or not within the code. Add it to used list, so that it
will not get eliminated when it is unused.
Reviewers: yaxunl, tra, hliao
Reviewed By: yaxunl
Subscribers: hliao, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D75402
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.h')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.h b/clang/lib/CodeGen/CodeGenModule.h index ff8cea4..fc44866 100644 --- a/clang/lib/CodeGen/CodeGenModule.h +++ b/clang/lib/CodeGen/CodeGenModule.h @@ -1037,7 +1037,7 @@ public: void MaybeHandleStaticInExternC(const SomeDecl *D, llvm::GlobalValue *GV); /// Add a global to a list to be added to the llvm.used metadata. - void addUsedGlobal(llvm::GlobalValue *GV); + void addUsedGlobal(llvm::GlobalValue *GV, bool SkipCheck = false); /// Add a global to a list to be added to the llvm.compiler.used metadata. void addCompilerUsedGlobal(llvm::GlobalValue *GV); |