forked from intel/llvm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DebugInfo] Generate debug info for system typedefs even with -fno-sy…
…stem-debug Signed-off-by: Lu, John <[email protected]>
- Loading branch information
Showing
2 changed files
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Ensure that debug info for typedefs in system headers is still generated | ||
// even if -fno-system-debug is used. This is justified because debug size | ||
// savings is small, but debugging is commonly done with types that are | ||
// typedef-ed in system headers. Thus, the increased debuggability | ||
// is worth the small extra cost. | ||
|
||
// RUN: %clang -fno-system-debug -emit-llvm -S -g %s -o %t.ll | ||
|
||
// RUN: FileCheck %s < %t.ll | ||
|
||
// CHECK: !DIDerivedType(tag: DW_TAG_typedef, name: "gid_t", | ||
// CHECK: !DIDerivedType(tag: DW_TAG_typedef, name: "__gid_t", | ||
// CHECK: !DIDerivedType(tag: DW_TAG_typedef, name: "uid_t", | ||
// CHECK: !DIDerivedType(tag: DW_TAG_typedef, name: "__uid_t", | ||
|
||
#include <unistd.h> | ||
|
||
uid_t xuid; | ||
gid_t xgid; | ||
|
||
int | ||
main (void) | ||
{ | ||
return 0; | ||
} |