mirror of
https://github.com/Gericom/teak-llvm.git
synced 2025-06-24 05:55:43 -04:00

Summary: Added option -gline-directives-only to support emission of the debug directives only. It behaves very similar to -gline-tables-only, except that it sets llvm debug info emission kind to llvm::DICompileUnit::DebugDirectivesOnly. Reviewers: echristo Subscribers: aprantl, fedor.sergeev, JDevlieghere, cfe-commits Differential Revision: https://reviews.llvm.org/D51177 llvm-svn: 341212
24 lines
882 B
C
24 lines
882 B
C
// RUN: %clang_cc1 -dwarf-version=4 -debug-info-kind=limited -disable-llvm-passes -emit-llvm < %s | FileCheck %s
|
|
// RUN: %clang_cc1 -dwarf-version=4 -debug-info-kind=line-tables-only -disable-llvm-passes -emit-llvm < %s | FileCheck --check-prefix=GMLT %s
|
|
// RUN: %clang_cc1 -dwarf-version=4 -debug-info-kind=line-directives-only -disable-llvm-passes -emit-llvm < %s | FileCheck --check-prefix=GMLT %s
|
|
// Two variables with same name in separate scope.
|
|
// Radar 8330217.
|
|
int main() {
|
|
int j = 0;
|
|
int k = 0;
|
|
// CHECK: !DILocalVariable(name: "i"
|
|
// CHECK-NEXT: !DILexicalBlock(
|
|
|
|
// Make sure we don't have any more lexical blocks because we don't need them in
|
|
// -gmlt.
|
|
// GMLT-NOT: !DILexicalBlock
|
|
for (int i = 0; i < 10; i++)
|
|
j++;
|
|
// CHECK: !DILocalVariable(name: "i"
|
|
// CHECK-NEXT: !DILexicalBlock(
|
|
// GMLT-NOT: !DILexicalBlock
|
|
for (int i = 0; i < 10; i++)
|
|
k++;
|
|
return 0;
|
|
}
|