From: Roger Ferrer Ibanez Date: Wed, 6 Jul 2016 07:13:49 +0000 (+0000) Subject: Add negative test for TBAA X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e2855b94ca83b1ed3840f3df71a3e7a2afcd200f;p=clang Add negative test for TBAA Revision r178818 added tests for TBAA but was missing negative tests to ensure that TBAA markers are not emitted when TBAA is off. Differential Revision: http://reviews.llvm.org/D21295 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@274610 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/CodeGen/tbaa.cpp b/test/CodeGen/tbaa.cpp index f98c46f149..432c41e107 100644 --- a/test/CodeGen/tbaa.cpp +++ b/test/CodeGen/tbaa.cpp @@ -1,6 +1,10 @@ // RUN: %clang_cc1 -triple x86_64-apple-darwin -O1 -no-struct-path-tbaa -disable-llvm-optzns %s -emit-llvm -o - | FileCheck %s // RUN: %clang_cc1 -triple x86_64-apple-darwin -O1 -disable-llvm-optzns %s -emit-llvm -o - | FileCheck %s -check-prefix=PATH +// RUN: %clang_cc1 -triple x86_64-apple-darwin -O0 -disable-llvm-optzns %s -emit-llvm -o - | FileCheck %s -check-prefix=NO-TBAA +// RUN: %clang_cc1 -triple x86_64-apple-darwin -O1 -relaxed-aliasing -disable-llvm-optzns %s -emit-llvm -o - | FileCheck %s -check-prefix=NO-TBAA // Test TBAA metadata generated by front-end. +// +// NO-TBAA-NOT: !tbaa typedef unsigned char uint8_t; typedef unsigned short uint16_t;