llvm.org GIT mirror llvm / 00297ba
Use the target triple from the target machine rather than the module to determine whether or not we're on a darwin platform for debug code emitting. Solves the problem of a module with no triple on the command line and no triple in the module using non-gdb ok features on darwin. Fix up the member-pointers test to check the correct things for cross platform (DW_FORM_flag is a good prefix). Unfortunately no testcase because I have no ideas how to test something without a triple and without a triple in the module yet check precisely on two platforms. Ideas welcome. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180660 91177308-0d34-0410-b5e6-96231b3b80d8 Eric Christopher 7 years ago
4 changed file(s) with 9 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
134134 /// getDataLayout - Return information about data layout.
135135 const DataLayout &getDataLayout() const;
136136
137 /// getTargetTriple - Return the target triple string.
138 StringRef getTargetTriple() const;
139
137140 /// getCurrentSection() - Return the current section we are emitting to.
138141 const MCSection *getCurrentSection() const;
139142
132132 return *TM.getDataLayout();
133133 }
134134
135 StringRef AsmPrinter::getTargetTriple() const {
136 return TM.getTargetTriple();
137 }
138
135139 /// getCurrentSection() - Return the current section we are emitting to.
136140 const MCSection *AsmPrinter::getCurrentSection() const {
137141 return OutStreamer.getCurrentSection().first;
175175
176176 // Turn on accelerator tables and older gdb compatibility
177177 // for Darwin.
178 bool IsDarwin = Triple(M->getTargetTriple()).isOSDarwin();
178 bool IsDarwin = Triple(A->getTargetTriple()).isOSDarwin();
179179 if (DarwinGDBCompat == Default) {
180180 if (IsDarwin)
181181 IsDarwinGDBCompat = true;
66 ; CHECK: [[TYPE:.*]]: DW_TAG_subroutine_type
77 ; CHECK: DW_TAG_formal_parameter
88 ; CHECK-NEXT: DW_AT_type
9 ; CHECK-NEXT: DW_AT_artificial [DW_FORM_flag_present]
9 ; CHECK-NEXT: DW_AT_artificial [DW_FORM_flag
1010 ; CHECK: DW_TAG_ptr_to_member_type
1111 ; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + {{.*}} => {[[TYPE]]})
1212 ; IR generated from clang -g with the following source: