<div dir="ltr">I wonder if this is portable between ELF and MachO situations. (I wonder/don't know if comma is valid in an ELF section name, for instance)<br><br>Maybe a single inline function would be more clearly portable? Not sure.<br><br><div class="gmail_quote"><div dir="ltr">On Tue, Jul 31, 2018 at 12:37 PM Wolfgang Pieb via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: wolfgangp<br>
Date: Tue Jul 31 12:37:29 2018<br>
New Revision: 338424<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=338424&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=338424&view=rev</a><br>
Log:<br>
[DWARF] Change a test to ensure the creation of a __debug_ranges section.<br>
<br>
Reviewer: aprantl<br>
<br>
Modified:<br>
    debuginfo-tests/trunk/apple-accel.cpp<br>
<br>
Modified: debuginfo-tests/trunk/apple-accel.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/debuginfo-tests/trunk/apple-accel.cpp?rev=338424&r1=338423&r2=338424&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/debuginfo-tests/trunk/apple-accel.cpp?rev=338424&r1=338423&r2=338424&view=diff</a><br>
==============================================================================<br>
--- debuginfo-tests/trunk/apple-accel.cpp (original)<br>
+++ debuginfo-tests/trunk/apple-accel.cpp Tue Jul 31 12:37:29 2018<br>
@@ -8,6 +8,9 @@<br>
 // RUN: %clang %s %target_itanium_abi_host_triple -gdwarf-4 -O0 -c -g -o %t-ex<br>
 // RUN: llvm-objdump -section-headers %t-ex | FileCheck %s<br>
<br>
+// A function in a different section forces the compiler to create the <br>
+// __debug_ranges section.<br>
+__attribute__((section("1,__text_foo"))) void foo() {}<br>
 int main (int argc, char const *argv[]) { return argc; }<br>
<br>
 // CHECK: __debug_str<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div></div>