diff options
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r-- | clang/lib/CodeGen/CGHLSLRuntime.cpp | 2 | ||||
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 5 |
2 files changed, 1 insertions, 6 deletions
diff --git a/clang/lib/CodeGen/CGHLSLRuntime.cpp b/clang/lib/CodeGen/CGHLSLRuntime.cpp index ed6d203..547220f 100644 --- a/clang/lib/CodeGen/CGHLSLRuntime.cpp +++ b/clang/lib/CodeGen/CGHLSLRuntime.cpp @@ -116,7 +116,7 @@ void CGHLSLRuntime::emitBufferGlobalsAndMetadata(const HLSLBufferDecl *BufDecl, BufGlobals.push_back(ValueAsMetadata::get(BufGV)); const auto *ElemIt = LayoutStruct->element_begin(); - for (Decl *D : BufDecl->buffer_decls()) { + for (Decl *D : BufDecl->decls()) { if (isa<CXXRecordDecl, EmptyDecl>(D)) // Nothing to do for this declaration. continue; diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 1b7d0ac..7924c32 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -5513,11 +5513,6 @@ void CodeGenModule::EmitGlobalVarDefinition(const VarDecl *D, if (getLangOpts().OpenCL && ASTTy->isSamplerT()) return; - // HLSL default buffer constants will be emitted during HLSLBufferDecl codegen - if (getLangOpts().HLSL && - D->getType().getAddressSpace() == LangAS::hlsl_constant) - return; - // If this is OpenMP device, check if it is legal to emit this global // normally. if (LangOpts.OpenMPIsTargetDevice && OpenMPRuntime && |