Remove .CUDAIsDevice flags from CodeGenOpts as it's already

available in LangOpts.

Differential Revision: http://reviews.llvm.org/D8385

llvm-svn: 232749
This commit is contained in:
Artem Belevich
2015-03-19 18:58:18 +00:00
parent 461c0c6934
commit f3d3db65de
4 changed files with 3 additions and 5 deletions

View File

@@ -1340,7 +1340,7 @@ void CodeGenModule::EmitGlobal(GlobalDecl GD) {
// If this is CUDA, be selective about which declarations we emit.
if (LangOpts.CUDA) {
if (CodeGenOpts.CUDAIsDevice) {
if (LangOpts.CUDAIsDevice) {
if (!Global->hasAttr<CUDADeviceAttr>() &&
!Global->hasAttr<CUDAGlobalAttr>() &&
!Global->hasAttr<CUDAConstantAttr>() &&
@@ -1909,7 +1909,7 @@ CharUnits CodeGenModule::GetTargetTypeStoreSize(llvm::Type *Ty) const {
unsigned CodeGenModule::GetGlobalVarAddressSpace(const VarDecl *D,
unsigned AddrSpace) {
if (LangOpts.CUDA && CodeGenOpts.CUDAIsDevice) {
if (LangOpts.CUDA && LangOpts.CUDAIsDevice) {
if (D->hasAttr<CUDAConstantAttr>())
AddrSpace = getContext().getTargetAddressSpace(LangAS::cuda_constant);
else if (D->hasAttr<CUDASharedAttr>())