From: Pirama Arumuga Nainar Date: Tue, 21 Jun 2016 21:35:11 +0000 (+0000) Subject: Emit the DWARF tag for the RenderScript language X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b4fa826a038f4e5963f4f39c927f536353c1f88f;p=clang Emit the DWARF tag for the RenderScript language Summary: If the RenderScript LangOpt is set, either via '-x renderscript' or the '.rs' file extension, set the DWARF language tag to be that of RenderScript. Reviewers: rsmith Subscribers: cfe-commits, srhines Differential Revision: http://reviews.llvm.org/D21451 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@273321 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp index e8536dbc68..441135dc90 100644 --- a/lib/CodeGen/CGDebugInfo.cpp +++ b/lib/CodeGen/CGDebugInfo.cpp @@ -377,6 +377,8 @@ void CGDebugInfo::CreateCompileUnit() { LangTag = llvm::dwarf::DW_LANG_C_plus_plus; } else if (LO.ObjC1) { LangTag = llvm::dwarf::DW_LANG_ObjC; + } else if (LO.RenderScript) { + LangTag = llvm::dwarf::DW_LANG_GOOGLE_RenderScript; } else if (LO.C99) { LangTag = llvm::dwarf::DW_LANG_C99; } else { diff --git a/test/CodeGen/debug-info-renderscript-tag.rs b/test/CodeGen/debug-info-renderscript-tag.rs new file mode 100644 index 0000000000..ded650d966 --- /dev/null +++ b/test/CodeGen/debug-info-renderscript-tag.rs @@ -0,0 +1,3 @@ +// RUN: %clang -emit-llvm -S -g %s -o - | FileCheck %s + +// CHECK: !DICompileUnit(language: DW_LANG_GOOGLE_RenderScript{{.*}})