diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2019-03-08 20:48:54 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2019-03-08 20:48:54 +0000 |
commit | 5b68c72f771bfe18e565a30bea0d5d0c5d530cf8 (patch) | |
tree | 8fdc906420d39c9a6d69a22c445309af49e131e1 | |
parent | 26e76ef0e2cf358809d2b41e657074fc21133d59 (diff) | |
download | bcm5719-llvm-5b68c72f771bfe18e565a30bea0d5d0c5d530cf8.tar.gz bcm5719-llvm-5b68c72f771bfe18e565a30bea0d5d0c5d530cf8.zip |
[OPENMP]Remove debug service variable.
Removed not required service variable for the debug info.
llvm-svn: 355729
-rw-r--r-- | clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp | 14 | ||||
-rw-r--r-- | clang/test/OpenMP/nvptx_target_firstprivate_codegen.cpp | 3 |
2 files changed, 1 insertions, 16 deletions
diff --git a/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp b/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp index 5eaa0f02adc..90799ed99f3 100644 --- a/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp +++ b/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp @@ -4958,20 +4958,6 @@ static std::pair<unsigned, unsigned> getSMsBlocksPerSM(CodeGenModule &CGM) { } void CGOpenMPRuntimeNVPTX::clear() { - if (CGDebugInfo *DI = CGM.getModuleDebugInfo()) - if (CGM.getCodeGenOpts().getDebugInfo() >= - codegenoptions::LimitedDebugInfo) { - ASTContext &C = CGM.getContext(); - auto *VD = VarDecl::Create( - C, C.getTranslationUnitDecl(), SourceLocation(), SourceLocation(), - &C.Idents.get("_$_"), C.IntTy, /*TInfo=*/nullptr, SC_Static); - auto *Var = cast<llvm::GlobalVariable>( - CGM.CreateRuntimeVariable(CGM.IntTy, "_$_")); - Var->setInitializer(llvm::ConstantInt::getNullValue(CGM.IntTy)); - Var->setLinkage(llvm::GlobalVariable::CommonLinkage); - CGM.addCompilerUsedGlobal(Var); - DI->EmitGlobalVariable(Var, VD); - } if (!GlobalizedRecords.empty()) { ASTContext &C = CGM.getContext(); llvm::SmallVector<const GlobalPtrSizeRecsTy *, 4> GlobalRecs; diff --git a/clang/test/OpenMP/nvptx_target_firstprivate_codegen.cpp b/clang/test/OpenMP/nvptx_target_firstprivate_codegen.cpp index c99b43c27f4..2c15eb6780d 100644 --- a/clang/test/OpenMP/nvptx_target_firstprivate_codegen.cpp +++ b/clang/test/OpenMP/nvptx_target_firstprivate_codegen.cpp @@ -17,8 +17,7 @@ struct TT { // TCHECK-DAG: [[TTII:%.+]] = type { i32, i32 } // TCHECK-DAG: [[S1:%.+]] = type { double } -// TCHECK: @__omp_offloading_firstprivate__{{.+}}_e_l28 = internal addrspace(4) global [[TTII]] zeroinitializer -// TCHECK: @{{.*}}_$_{{.*}} = common global i32 0, !dbg !{{[0-9]+}} +// TCHECK: @__omp_offloading_firstprivate__{{.+}}_e_l27 = internal addrspace(4) global [[TTII]] zeroinitializer int foo(int n, double *ptr) { int a = 0; short aa = 0; |