summaryrefslogtreecommitdiff
path: root/test/Instrumentation/AddressSanitizer
diff options
context:
space:
mode:
authorKostya Serebryany <kcc@google.com>2013-03-18 09:38:39 +0000
committerKostya Serebryany <kcc@google.com>2013-03-18 09:38:39 +0000
commit5111627ac1b0ae8a5a9d4dc1be8b22939ba850d0 (patch)
tree7b27bb437151449ca8b447759ad3f04e2fe5ce92 /test/Instrumentation/AddressSanitizer
parent5e8da1773c8a16a9e3f08df444420f04d71ba673 (diff)
downloadllvm-5111627ac1b0ae8a5a9d4dc1be8b22939ba850d0.tar.gz
llvm-5111627ac1b0ae8a5a9d4dc1be8b22939ba850d0.tar.bz2
llvm-5111627ac1b0ae8a5a9d4dc1be8b22939ba850d0.tar.xz
[asan] when creating string constants, set unnamed_attr and align 1 so that equal strings are merged by the linker. Observed up to 1% binary size reduction. Thanks to Anton Korobeynikov for the suggestion
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177264 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Instrumentation/AddressSanitizer')
-rw-r--r--test/Instrumentation/AddressSanitizer/do-not-instrument-internal-globals.ll5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/Instrumentation/AddressSanitizer/do-not-instrument-internal-globals.ll b/test/Instrumentation/AddressSanitizer/do-not-instrument-internal-globals.ll
index 2efd6b1e0d..0928c49415 100644
--- a/test/Instrumentation/AddressSanitizer/do-not-instrument-internal-globals.ll
+++ b/test/Instrumentation/AddressSanitizer/do-not-instrument-internal-globals.ll
@@ -14,6 +14,7 @@ entry:
declare void @_Z3fooPi(i32*)
; We create one global string constant for the stack frame above.
+; It should have unnamed_addr and align 1.
; Make sure we don't create any other global constants.
-; CHECK: = private constant
-; CHECK-NOT: = private constant
+; CHECK: = private unnamed_addr constant{{.*}}align 1
+; CHECK-NOT: = private unnamed_addr constant