Skip to content

Commit

Permalink
Emit the DWARF tag for the RenderScript language
Browse files Browse the repository at this point in the history
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

llvm-svn: 273321
  • Loading branch information
pirama-arumuga-nainar committed Jun 21, 2016
1 parent 8a99ecd commit a7484c9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions clang/lib/CodeGen/CGDebugInfo.cpp
Expand Up @@ -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 {
Expand Down
3 changes: 3 additions & 0 deletions clang/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{{.*}})

0 comments on commit a7484c9

Please sign in to comment.