From 6b07a1c6ee50dcf4d52a4a314b4774347f9b22c0 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Fri, 20 Feb 2015 18:08:57 +0000 Subject: Add -funique-section-names and -fno-unique-section-names options. For now -funique-section-names is the default, so no change in default behavior. The total .o size in a build of llvm and clang goes from 241687775 to 230649031 bytes if -fno-unique-section-names is used. llvm-svn: 230031 --- clang/test/Driver/function-sections.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'clang/test/Driver/function-sections.c') diff --git a/clang/test/Driver/function-sections.c b/clang/test/Driver/function-sections.c index fe6d303e3ec..ba065b1367a 100644 --- a/clang/test/Driver/function-sections.c +++ b/clang/test/Driver/function-sections.c @@ -4,6 +4,8 @@ // CHECK-NOFS-NOT: -ffunction-sections // CHECK-DS: -fdata-sections // CHECK-NODS-NOT: -fdata-sections +// CHECK-US-NOT: -fno-unique-section-names +// CHECK-NOUS: -fno-unique-section-names // RUN: %clang -no-canonical-prefixes %s -### -fsyntax-only 2>&1 \ // RUN: -target i386-unknown-linux \ @@ -60,3 +62,13 @@ // RUN: -fdata-sections -fno-data-sections -fdata-sections \ // RUN: | FileCheck --check-prefix=CHECK-DS %s + +// RUN: %clang -no-canonical-prefixes %s -### -fsyntax-only 2>&1 \ +// RUN: -target i386-unknown-linux \ +// RUN: -funique-section-names \ +// RUN: | FileCheck --check-prefix=CHECK-US %s + +// RUN: %clang -no-canonical-prefixes %s -### -fsyntax-only 2>&1 \ +// RUN: -target i386-unknown-linux \ +// RUN: -fno-unique-section-names \ +// RUN: | FileCheck --check-prefix=CHECK-NOUS %s -- cgit v1.2.3