From e2855b94ca83b1ed3840f3df71a3e7a2afcd200f Mon Sep 17 00:00:00 2001 From: Roger Ferrer Ibanez Date: Wed, 6 Jul 2016 07:13:49 +0000 Subject: [PATCH] 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 --- test/CodeGen/tbaa.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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; -- 2.50.1