From c250192494e0fa63be50269d2c1eb7786f8ab7a0 Mon Sep 17 00:00:00 2001 From: Argyrios Kyrtzidis Date: Fri, 12 Jul 2013 22:30:03 +0000 Subject: [PATCH] Changes so that a few tests do not fail when running under guarded malloc. Guarded malloc emits some messages at the beginning in stderr when enabled. These messages caused a few tests to fail. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186219 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/AST/RecordLayoutBuilder.cpp | 4 ++-- lib/CodeGen/CGRecordLayoutBuilder.cpp | 10 +++++----- test/ASTMerge/class.cpp | 2 +- test/CodeGen/bitfield-2.c | 2 +- test/CodeGen/override-layout.c | 6 +++--- test/CodeGenCXX/override-layout.cpp | 6 +++--- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/lib/AST/RecordLayoutBuilder.cpp b/lib/AST/RecordLayoutBuilder.cpp index c9dd2e32cb..51b1c062e0 100644 --- a/lib/AST/RecordLayoutBuilder.cpp +++ b/lib/AST/RecordLayoutBuilder.cpp @@ -2423,8 +2423,8 @@ ASTContext::getASTRecordLayout(const RecordDecl *D) const { ASTRecordLayouts[D] = NewEntry; if (getLangOpts().DumpRecordLayouts) { - llvm::errs() << "\n*** Dumping AST Record Layout\n"; - DumpRecordLayout(D, llvm::errs(), getLangOpts().DumpRecordLayoutsSimple); + llvm::outs() << "\n*** Dumping AST Record Layout\n"; + DumpRecordLayout(D, llvm::outs(), getLangOpts().DumpRecordLayoutsSimple); } return *NewEntry; diff --git a/lib/CodeGen/CGRecordLayoutBuilder.cpp b/lib/CodeGen/CGRecordLayoutBuilder.cpp index 8d692c5f69..fd86df0bdb 100644 --- a/lib/CodeGen/CGRecordLayoutBuilder.cpp +++ b/lib/CodeGen/CGRecordLayoutBuilder.cpp @@ -976,11 +976,11 @@ CGRecordLayout *CodeGenTypes::ComputeRecordLayout(const RecordDecl *D, // Dump the layout, if requested. if (getContext().getLangOpts().DumpRecordLayouts) { - llvm::errs() << "\n*** Dumping IRgen Record Layout\n"; - llvm::errs() << "Record: "; - D->dump(); - llvm::errs() << "\nLayout: "; - RL->dump(); + llvm::outs() << "\n*** Dumping IRgen Record Layout\n"; + llvm::outs() << "Record: "; + D->dump(llvm::outs()); + llvm::outs() << "\nLayout: "; + RL->print(llvm::outs()); } #ifndef NDEBUG diff --git a/test/ASTMerge/class.cpp b/test/ASTMerge/class.cpp index 885b65e983..7b31187c46 100644 --- a/test/ASTMerge/class.cpp +++ b/test/ASTMerge/class.cpp @@ -1,7 +1,7 @@ // RUN: %clang_cc1 -emit-pch -o %t.1.ast %S/Inputs/class1.cpp // RUN: %clang_cc1 -emit-pch -o %t.2.ast %S/Inputs/class2.cpp // RUN: %clang_cc1 -ast-merge %t.1.ast -ast-merge %t.2.ast -fsyntax-only %s 2>&1 | FileCheck %s -// RUN: %clang_cc1 -ast-merge %t.1.ast -ast-merge %t.2.ast -fsyntax-only %s 2>&1 -Wno-odr | count 0 +// RUN: %clang_cc1 -ast-merge %t.1.ast -ast-merge %t.2.ast -fsyntax-only %s 2>&1 -Wno-odr -Werror // CHECK: class1.cpp:5:8: warning: type 'B' has incompatible definitions in different translation units // CHECK: class1.cpp:6:9: note: field 'y' has type 'float' here diff --git a/test/CodeGen/bitfield-2.c b/test/CodeGen/bitfield-2.c index bec55ffa75..64808155cc 100644 --- a/test/CodeGen/bitfield-2.c +++ b/test/CodeGen/bitfield-2.c @@ -1,5 +1,5 @@ // RUN: %clang_cc1 -emit-llvm -triple x86_64 -O3 -o %t.opt.ll %s \ -// RUN: -fdump-record-layouts 2> %t.dump.txt +// RUN: -fdump-record-layouts > %t.dump.txt // RUN: FileCheck -check-prefix=CHECK-RECORD < %t.dump.txt %s // RUN: FileCheck -check-prefix=CHECK-OPT < %t.opt.ll %s diff --git a/test/CodeGen/override-layout.c b/test/CodeGen/override-layout.c index 8a108a9f50..57de8b525d 100644 --- a/test/CodeGen/override-layout.c +++ b/test/CodeGen/override-layout.c @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -w -fdump-record-layouts %s 2> %t.layouts -// RUN: %clang_cc1 -w -fdump-record-layouts-simple %s > %t.before 2>&1 -// RUN: %clang_cc1 -w -DPACKED= -DALIGNED16= -fdump-record-layouts-simple -foverride-record-layout=%t.layouts %s > %t.after 2>&1 +// RUN: %clang_cc1 -w -fdump-record-layouts %s > %t.layouts +// RUN: %clang_cc1 -w -fdump-record-layouts-simple %s > %t.before +// RUN: %clang_cc1 -w -DPACKED= -DALIGNED16= -fdump-record-layouts-simple -foverride-record-layout=%t.layouts %s > %t.after // RUN: diff %t.before %t.after // RUN: FileCheck %s < %t.after diff --git a/test/CodeGenCXX/override-layout.cpp b/test/CodeGenCXX/override-layout.cpp index aba4c9179a..418c4ffab6 100644 --- a/test/CodeGenCXX/override-layout.cpp +++ b/test/CodeGenCXX/override-layout.cpp @@ -1,6 +1,6 @@ -// RUN: %clang_cc1 -fdump-record-layouts-simple %s 2> %t.layouts -// RUN: %clang_cc1 -fdump-record-layouts-simple %s > %t.before 2>&1 -// RUN: %clang_cc1 -DPACKED= -DALIGNED16= -fdump-record-layouts-simple -foverride-record-layout=%t.layouts %s > %t.after 2>&1 +// RUN: %clang_cc1 -fdump-record-layouts-simple %s > %t.layouts +// RUN: %clang_cc1 -fdump-record-layouts-simple %s > %t.before +// RUN: %clang_cc1 -DPACKED= -DALIGNED16= -fdump-record-layouts-simple -foverride-record-layout=%t.layouts %s > %t.after // RUN: diff -u %t.before %t.after // RUN: FileCheck %s < %t.after -- 2.40.0